diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 2b3001b84b..4a1dd4548a 100755 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -1392,17 +1392,6 @@ void InterfaceMakerPythonNative::write_module_class(ostream &out, Object *obj) out << " PyDict_SetItemString(Dtool_"<::iterator sfi; - for(sfi= static_functions.begin(); sfi != static_functions.end(); sfi++) - { - out << " // Static Method " << methodNameFromCppName( sfi->second->_ifunc.get_name(),export_calss_name) << "\n"; - out << " PyDict_SetItemString(Dtool_" << ClassName << ".As_PyTypeObject().tp_dict,\"" ; - out << methodNameFromCppName( sfi->second->_ifunc.get_name(),export_calss_name) ; - out << "\",PyCFunction_New(&Dtool_Methods_"<< ClassName <<"[" << sfi->first << "],&Dtool_"<< ClassName<< ".As_PyObject()));\n"; - } - // the standard call functions std::map::iterator ofi; @@ -1489,6 +1478,19 @@ void InterfaceMakerPythonNative::write_module_class(ostream &out, Object *obj) out << " Py_INCREF(&Dtool_"<< ClassName << ".As_PyTypeObject());\n"; out << " PyDict_SetItemString(Dtool_"<::iterator sfi; + for(sfi= static_functions.begin(); sfi != static_functions.end(); sfi++) + { + out << " // Static Method " << methodNameFromCppName( sfi->second->_ifunc.get_name(),export_calss_name) << "\n"; + out << " PyDict_SetItemString(Dtool_" << ClassName << ".As_PyTypeObject().tp_dict,\"" ; + out << methodNameFromCppName( sfi->second->_ifunc.get_name(),export_calss_name) ; + out << "\",PyCFunction_New(&Dtool_Methods_"<< ClassName <<"[" << sfi->first << "],&Dtool_"<< ClassName<< ".As_PyObject()));\n"; + } + + + if(is_runtime_typed) out << " RegisterRuntimeClass(&Dtool_"<