mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
py_panda: make standard_type_members static and internal
This commit is contained in:
parent
3a3cb01148
commit
7995d483ab
@ -15,6 +15,16 @@
|
|||||||
|
|
||||||
#ifdef HAVE_PYTHON
|
#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) {
|
static PyObject *GetSuperBase(PyObject *self) {
|
||||||
Dtool_PyTypedObject *super_base = Dtool_GetSuperBase();
|
Dtool_PyTypedObject *super_base = Dtool_GetSuperBase();
|
||||||
Py_XINCREF((PyTypeObject *)super_base); // order is important .. this is used for static functions
|
Py_XINCREF((PyTypeObject *)super_base); // order is important .. this is used for static functions
|
||||||
|
@ -12,16 +12,6 @@
|
|||||||
|
|
||||||
using std::string;
|
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 */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -67,9 +67,6 @@ struct Dtool_PyInstDef {
|
|||||||
bool _is_const;
|
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.
|
// The Class Definition Structor For a Dtool python type.
|
||||||
struct Dtool_PyTypedObject {
|
struct Dtool_PyTypedObject {
|
||||||
// Standard Python Features..
|
// Standard Python Features..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user