mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
*** empty log message ***
This commit is contained in:
parent
d2f3184eaa
commit
d259278846
@ -1479,7 +1479,14 @@ void InterfaceMakerPythonNative::write_module_class(ostream &out, Object *obj)
|
||||
}
|
||||
}
|
||||
|
||||
out << " PyType_Ready(&Dtool_"<< ClassName << ".As_PyTypeObject());\n";
|
||||
out << " if(PyType_Ready(&Dtool_"<< ClassName << ".As_PyTypeObject()) < 0)\n";
|
||||
out << " {\n";
|
||||
out << " PyErr_SetString(PyExc_TypeError, \"PyType_Ready("<< ClassName << ")\");\n";
|
||||
out << " printf(\" Error In PyType_Ready" << ClassName << "\");\n";
|
||||
out << " return;\n";
|
||||
out << " }\n";
|
||||
|
||||
out << " Py_INCREF(&Dtool_"<< ClassName << ".As_PyTypeObject());\n";
|
||||
out << " PyDict_SetItemString(Dtool_"<<ClassName <<".As_PyTypeObject().tp_dict,\""<<export_calss_name<< "\",&Dtool_"<<ClassName <<".As_PyObject());\n";
|
||||
|
||||
if(is_runtime_typed)
|
||||
@ -1487,7 +1494,6 @@ void InterfaceMakerPythonNative::write_module_class(ostream &out, Object *obj)
|
||||
else
|
||||
out << " RegisterRuntimeClass(&Dtool_"<<ClassName<<",-1);\n";
|
||||
|
||||
out << " Py_INCREF(&Dtool_"<< ClassName << ".As_PyTypeObject());\n";
|
||||
out << " }\n";
|
||||
|
||||
out << " if(module != NULL)\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user