Browse Source

*** empty log message ***

Roger Hughston 20 years ago
parent
commit
b0276d5ddd

+ 1 - 1
dtool/src/interrogate/interfaceMakerPythonNative.cxx

@@ -858,7 +858,7 @@ void InterfaceMakerPythonNative::write_module_support(ostream &out,ostream *out_
 
     bool force_base_functions = true;
 
-    out << "PyMethodDef python_simple_funcs[] = {\n";
+    out << "static PyMethodDef python_simple_funcs[] = {\n";
     Functions::iterator fi;
     for (fi = _functions.begin(); fi != _functions.end(); ++fi) 
     {

+ 7 - 1
dtool/src/interrogatedb/interrogateType.cxx

@@ -225,13 +225,19 @@ remap_indices(const IndexRemapper &remap) {
 
 }
 
+
+////////////////////////////////////////////////////////////////////
+//     Function: GetRunTimeDictionary
+////////////////////////////////////////////////////////////////////
 EXPCL_DTOOLCONFIG RunTimeTypeDictionary & GetRunTimeDictionary()
 {
     static RunTimeTypeDictionary dict;
     return dict;
 };
 
-
+////////////////////////////////////////////////////////////////////
+//     Function: GetRunTimeTypeList
+////////////////////////////////////////////////////////////////////
 EXPCL_DTOOLCONFIG RunTimeTypeList & GetRunTimeTypeList()
 {
     static RunTimeTypeList list;

+ 2 - 2
dtool/src/interrogatedb/interrogateType.h

@@ -229,8 +229,8 @@ struct Dtool_PyTypedObject;
 typedef std::map< int , Dtool_PyTypedObject *>   RunTimeTypeDictionary;
 typedef std::set<int >                           RunTimeTypeList;
 
-extern "C" EXPCL_DTOOL  RunTimeTypeDictionary & GetRunTimeDictionary();
-extern "C" EXPCL_DTOOL  RunTimeTypeList & GetRunTimeTypeList();
+EXPCL_DTOOLCONFIG  RunTimeTypeDictionary & GetRunTimeDictionary();
+EXPCL_DTOOLCONFIG  RunTimeTypeList & GetRunTimeTypeList();
 
 
 #endif

+ 3 - 7
dtool/src/interrogatedb/py_panda.h

@@ -64,11 +64,9 @@ using namespace std;
 #ifdef _WIN32
 #define EXPORT_THIS  __declspec(dllexport) 
 #define IMPORT_THIS  __declspec(dllimport) 
-#define IMPORT_FROM_SHARED_LIB __declspec(dllimport) 
 #else
 #define EXPORT_THIS 
-#define IMPORT_THIS 
-#define IMPORT_FROM_SHARED_LIB 
+#define IMPORT_THIS     extern
 #endif
 ///////////////////////////////////////////////////////////////////////////////////
 
@@ -76,8 +74,8 @@ struct          Dtool_PyTypedObject;
 typedef std::map< int , Dtool_PyTypedObject *>   RunTimeTypeDictionary;
 typedef std::set<int >                           RunTimeTypeList;
 
-DTOOL_C_LINKAGE   RunTimeTypeDictionary & GetRunTimeDictionary();
-DTOOL_C_LINKAGE   RunTimeTypeList & GetRunTimeTypeList();
+EXPCL_DTOOLCONFIG   RunTimeTypeDictionary & GetRunTimeDictionary();
+EXPCL_DTOOLCONFIG   RunTimeTypeList & GetRunTimeTypeList();
 
 
 //////////////////////////////////////////////////////////
@@ -540,7 +538,6 @@ DTOOL_C_LINKAGE inline void RegisterRuntimeClass(Dtool_PyTypedObject * otype, in
 
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-#ifndef NO_RUNTIME_TYPES
 DTOOL_C_LINKAGE inline Dtool_PyTypedObject *  Dtool_RuntimeTypeDtoolType(int type)
 {
     RunTimeTypeDictionary::iterator di = GetRunTimeDictionary().find(type);
@@ -558,7 +555,6 @@ DTOOL_C_LINKAGE inline Dtool_PyTypedObject *  Dtool_RuntimeTypeDtoolType(int typ
 
     return NULL;    
 };
-#endif 
 ///////////////////////////////////////////////////////////////////////////////
 //// We need a way to runtime merge compile units into a python "Module" .. this is done with the 
 /// fallowing structors and code.. along with the support of interigate_module