Browse Source

py_panda: make standard_type_members static and internal

rdb 7 years ago
parent
commit
7995d483ab

+ 10 - 0
dtool/src/interrogatedb/dtool_super_base.cxx

@@ -15,6 +15,16 @@
 
 #ifdef HAVE_PYTHON
 
+static PyMemberDef standard_type_members[] = {
+  {(char *)"this", (sizeof(void*) == sizeof(int)) ? T_UINT : T_ULONGLONG, offsetof(Dtool_PyInstDef, _ptr_to_object), READONLY, (char *)"C++ 'this' pointer, if any"},
+  {(char *)"this_ownership", T_BOOL, offsetof(Dtool_PyInstDef, _memory_rules), READONLY, (char *)"C++ 'this' ownership rules"},
+  {(char *)"this_const", T_BOOL, offsetof(Dtool_PyInstDef, _is_const), READONLY, (char *)"C++ 'this' const flag"},
+// {(char *)"this_signature", T_INT, offsetof(Dtool_PyInstDef, _signature),
+// READONLY, (char *)"A type check signature"},
+  {(char *)"this_metatype", T_OBJECT, offsetof(Dtool_PyInstDef, _My_Type), READONLY, (char *)"The dtool meta object"},
+  {nullptr}  /* Sentinel */
+};
+
 static PyObject *GetSuperBase(PyObject *self) {
   Dtool_PyTypedObject *super_base = Dtool_GetSuperBase();
   Py_XINCREF((PyTypeObject *)super_base); // order is important .. this is used for static functions

+ 0 - 10
dtool/src/interrogatedb/py_panda.cxx

@@ -12,16 +12,6 @@
 
 using std::string;
 
-PyMemberDef standard_type_members[] = {
-  {(char *)"this", (sizeof(void*) == sizeof(int)) ? T_UINT : T_ULONGLONG, offsetof(Dtool_PyInstDef, _ptr_to_object), READONLY, (char *)"C++ 'this' pointer, if any"},
-  {(char *)"this_ownership", T_BOOL, offsetof(Dtool_PyInstDef, _memory_rules), READONLY, (char *)"C++ 'this' ownership rules"},
-  {(char *)"this_const", T_BOOL, offsetof(Dtool_PyInstDef, _is_const), READONLY, (char *)"C++ 'this' const flag"},
-// {(char *)"this_signature", T_INT, offsetof(Dtool_PyInstDef, _signature),
-// READONLY, (char *)"A type check signature"},
-  {(char *)"this_metatype", T_OBJECT, offsetof(Dtool_PyInstDef, _My_Type), READONLY, (char *)"The dtool meta object"},
-  {nullptr}  /* Sentinel */
-};
-
 /**
 
  */

+ 0 - 3
dtool/src/interrogatedb/py_panda.h

@@ -67,9 +67,6 @@ struct Dtool_PyInstDef {
   bool _is_const;
 };
 
-// A Offset Dictionary Defining How to read the Above Object..
-extern PyMemberDef standard_type_members[];
-
 // The Class Definition Structor For a Dtool python type.
 struct Dtool_PyTypedObject {
   // Standard Python Features..