File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -195,15 +195,15 @@ inline detail::type_info *get_local_type_info(const std::type_index &tp) {
195
195
auto &locals = registered_local_types_cpp ();
196
196
auto it = locals.find (tp);
197
197
if (it != locals.end ())
198
- return (detail::type_info *) it->second ;
198
+ return it->second ;
199
199
return nullptr ;
200
200
}
201
201
202
202
inline detail::type_info *get_global_type_info (const std::type_index &tp) {
203
203
auto &types = get_internals ().registered_types_cpp ;
204
204
auto it = types.find (tp);
205
205
if (it != types.end ())
206
- return (detail::type_info *) it->second ;
206
+ return it->second ;
207
207
return nullptr ;
208
208
}
209
209
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ struct overload_hash {
65
65
// / Whenever binary incompatible changes are made to this structure,
66
66
// / `PYBIND11_INTERNALS_VERSION` must be incremented.
67
67
struct internals {
68
- type_map<void *> registered_types_cpp; // std::type_index -> type_info
68
+ type_map<type_info *> registered_types_cpp; // std::type_index -> type_info
69
69
std::unordered_map<PyTypeObject *, std::vector<type_info *>> registered_types_py; // PyTypeObject* -> base type_info(s)
70
70
std::unordered_multimap<const void *, instance*> registered_instances; // void * -> instance*
71
71
std::unordered_set<std::pair<const PyObject *, const char *>, overload_hash> inactive_overload_cache;
@@ -167,8 +167,8 @@ PYBIND11_NOINLINE inline internals &get_internals() {
167
167
}
168
168
169
169
// / Works like `internals.registered_types_cpp`, but for module-local registered types:
170
- PYBIND11_NOINLINE inline type_map<void *> ®istered_local_types_cpp () {
171
- static type_map<void *> locals{};
170
+ PYBIND11_NOINLINE inline type_map<type_info *> ®istered_local_types_cpp () {
171
+ static type_map<type_info *> locals{};
172
172
return locals;
173
173
}
174
174
You can’t perform that action at this time.
0 commit comments