diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index 026d1c6858..23a38c4f7f 100644 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -161,6 +161,9 @@ static void Dtool_FreeInstance_##CLASS_NAME(PyObject *self) {\ Py_TYPE(self)->tp_free(self);\ } +// Extract the PyTypeObject pointer corresponding to a Dtool_PyTypedObject. +#define Dtool_GetPyTypeObject(type) (&(type)->_PyType) + // Use DtoolInstance_Check to check whether a PyObject* is a DtoolInstance. #define DtoolInstance_Check(obj) \ (Py_TYPE(obj)->tp_basicsize >= (int)sizeof(Dtool_PyInstDef) && \