File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,8 @@ extern "C" inline void pybind11_object_dealloc(PyObject *self) {
301301 needed in order to satisfy Python's requirements for multiple inheritance.
302302 Return value: New reference. */
303303inline PyObject *make_object_base_type (PyTypeObject *metaclass) {
304- auto name_obj = reinterpret_steal<object>(PYBIND11_FROM_STRING (" pybind11_object" ));
304+ constexpr auto *name = " pybind11_object" ;
305+ auto name_obj = reinterpret_steal<object>(PYBIND11_FROM_STRING (name));
305306
306307 /* Danger zone: from now (and until PyType_Ready), make sure to
307308 issue no Python C API calls which could potentially invoke the
@@ -317,7 +318,7 @@ inline PyObject *make_object_base_type(PyTypeObject *metaclass) {
317318#endif
318319
319320 auto type = &heap_type->ht_type ;
320- type->tp_name = " pybind11_object " ;
321+ type->tp_name = name ;
321322 type->tp_base = &PyBaseObject_Type;
322323 type->tp_basicsize = static_cast <ssize_t >(sizeof (instance));
323324 type->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HEAPTYPE;
You can’t perform that action at this time.
0 commit comments