diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 67edbda008..8ae54a1b32 100755 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -366,6 +366,7 @@ std::string make_safe_name(const std::string & name) { return InterrogateBuilder::clean_identifier(name); + /* static const char safe_chars2[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; std::string result = name; @@ -377,6 +378,7 @@ std::string make_safe_name(const std::string & name) } return result; + */ } bool isInplaceFunction(const std::string &cppName) @@ -1228,7 +1230,8 @@ void InterfaceMakerPythonNative::write_module_class(ostream &out, Object *obj) << "};\n\n"; int num_derivations = obj->_itype.number_of_derivations(); - for (int di = 0; di < num_derivations; di++) + int di; + for (di = 0; di < num_derivations; di++) { TypeIndex d_type_Index = obj->_itype.get_derivation(di); if(!interrogate_type_is_unpublished(d_type_Index)) @@ -1247,7 +1250,7 @@ void InterfaceMakerPythonNative::write_module_class(ostream &out, Object *obj) } std::vector< std::string > bases; - for (int di = 0; di < num_derivations; di++) + for (di = 0; di < num_derivations; di++) { TypeIndex d_type_Index = obj->_itype.get_derivation(di); if(!interrogate_type_is_unpublished(d_type_Index)) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.h b/dtool/src/interrogate/interfaceMakerPythonNative.h index aaa29d21f0..b390865a65 100755 --- a/dtool/src/interrogate/interfaceMakerPythonNative.h +++ b/dtool/src/interrogate/interfaceMakerPythonNative.h @@ -103,7 +103,7 @@ public: bool _is_legal_py_class; }; - void InterfaceMakerPythonNative::GetValideChildClasses( std::map< std::string ,CastDetails > &answer, CPPStructType * inclass, const std::string &up_cast_seed = "", bool downcastposible = true); + void GetValideChildClasses( std::map< std::string ,CastDetails > &answer, CPPStructType * inclass, const std::string &up_cast_seed = "", bool downcastposible = true); bool DoesInheritFromIsClass( const CPPStructType * inclass, const std::string &name); bool IsPandaTypedObject(CPPStructType * inclass) { return DoesInheritFromIsClass(inclass,"TypedObject"); }; void WriteReturnInstance(ostream &out, int indent_level, std::string &return_expr, std::string &ows_memory_flag,const std::string &class_name, CPPType *ctype, bool inplace); diff --git a/dtool/src/interrogate/typeManager.cxx b/dtool/src/interrogate/typeManager.cxx index e7a7b9491a..347118f9c5 100644 --- a/dtool/src/interrogate/typeManager.cxx +++ b/dtool/src/interrogate/typeManager.cxx @@ -1601,6 +1601,7 @@ bool TypeManager::IsLocal(CPPType *in_type) return false; + /* if (base_type->get_subtype() == CPPDeclaration::ST_struct) { @@ -1658,4 +1659,5 @@ bool TypeManager::IsLocal(CPPType *in_type) return true; return false; + */ }; diff --git a/dtool/src/interrogatedb/dtool_super_base.cxx b/dtool/src/interrogatedb/dtool_super_base.cxx index 79580af9bc..1ae45c57f8 100644 --- a/dtool/src/interrogatedb/dtool_super_base.cxx +++ b/dtool/src/interrogatedb/dtool_super_base.cxx @@ -17,6 +17,8 @@ //////////////////////////////////////////////////////////////////// #include "py_panda.h" + +#ifdef HAVE_PYTHON class EmptyClass { @@ -93,3 +95,5 @@ int Dtool_Init_DTOOL_SUPPER_BASE(PyObject *self, PyObject *args, PyObject *kwds PyErr_SetString(PyExc_TypeError, "Error Can Not Init SUPPER BASE"); return -1; } + +#endif // HAVE_PYTHON diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index 61f66469cd..f28c40d916 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -18,6 +18,8 @@ #include "py_panda.h" +#ifdef HAVE_PYTHON + PyMemberDef standard_type_members[] = { {"this", T_INT, offsetof(Dtool_PyInstDef,_ptr_to_object),READONLY,"C++ This if any"}, {"this_ownership", T_INT, offsetof(Dtool_PyInstDef, _memory_rules), READONLY,"C++ 'this' ownership rules"}, @@ -477,3 +479,5 @@ int DTOOL_PyObject_Compare(PyObject *v1, PyObject *v2) return 1; return 0; } + +#endif // HAVE_PYTHON diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index 2eb00a8b6e..019e1dc11b 100755 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -40,6 +40,8 @@ #endif +#ifdef HAVE_PYTHON + #ifdef HAVE_LONG_LONG #undef HAVE_LONG_LONG #endif @@ -460,5 +462,8 @@ EXPCL_DTOOLCONFIG int DTOOL_PyObject_Compare(PyObject *v1, PyObject *v2); EXPCL_DTOOLCONFIG extern struct Dtool_PyTypedObject Dtool_DTOOL_SUPPER_BASE; +#endif // HAVE_PYTHON + + #endif // PY_PANDA_H_