Browse Source

build on irix

David Rose 20 years ago
parent
commit
1f94eb12b4

+ 5 - 2
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))

+ 1 - 1
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);

+ 2 - 0
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;
+ */
 };

+ 4 - 0
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

+ 4 - 0
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

+ 5 - 0
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_