From 608643da5a8872538f5ac2f8fdf71ac537035136 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 9 Mar 2012 22:26:59 +0000 Subject: [PATCH] another fix for .this -> T_ULONG --- dtool/src/interrogate/interfaceMakerPythonSimple.cxx | 2 +- dtool/src/interrogatedb/py_panda.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx index 2a92c1f347..449b16b2aa 100644 --- a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx @@ -502,7 +502,7 @@ pack_return_value(ostream &out, int indent_level, } else if (TypeManager::is_pointer(type)) { indent(out, indent_level) - << "return PyInt_FromLong((int)" << return_expr << ");\n"; + << "return PyLong_FromVoidPtr((void*)" << return_expr << ");\n"; } else { // Return None. diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index a4cae0af3d..0e3d90d4db 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -18,7 +18,7 @@ #ifdef HAVE_PYTHON PyMemberDef standard_type_members[] = { - {(char *)"this", T_INT, offsetof(Dtool_PyInstDef,_ptr_to_object),READONLY, (char *)"C++ This if any"}, + {(char *)"this", T_ULONG, offsetof(Dtool_PyInstDef,_ptr_to_object),READONLY, (char *)"C++ 'this' pointer, if any"}, // {(char *)"this_ownership", T_INT, offsetof(Dtool_PyInstDef, _memory_rules), READONLY, (char *)"C++ 'this' ownership rules"}, // {(char *)"this_const", T_INT, 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"},