Преглед изворни кода

another fix for .this -> T_ULONG

rdb пре 13 година
родитељ
комит
608643da5a

+ 1 - 1
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.

+ 1 - 1
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"},