From b0276d5dddf35750b77a95bc36ffb2c2fd17f22d Mon Sep 17 00:00:00 2001 From: Roger Hughston Date: Tue, 24 May 2005 18:16:25 +0000 Subject: [PATCH] *** empty log message *** --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 +- dtool/src/interrogatedb/interrogateType.cxx | 8 +++++++- dtool/src/interrogatedb/interrogateType.h | 4 ++-- dtool/src/interrogatedb/py_panda.h | 10 +++------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 185b6950f2..ff7ec99742 100755 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/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) { diff --git a/dtool/src/interrogatedb/interrogateType.cxx b/dtool/src/interrogatedb/interrogateType.cxx index 952f640f47..4bb3bf2386 100644 --- a/dtool/src/interrogatedb/interrogateType.cxx +++ b/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; diff --git a/dtool/src/interrogatedb/interrogateType.h b/dtool/src/interrogatedb/interrogateType.h index f964664966..58adda6a2d 100644 --- a/dtool/src/interrogatedb/interrogateType.h +++ b/dtool/src/interrogatedb/interrogateType.h @@ -229,8 +229,8 @@ struct Dtool_PyTypedObject; typedef std::map< int , Dtool_PyTypedObject *> RunTimeTypeDictionary; typedef std::set RunTimeTypeList; -extern "C" EXPCL_DTOOL RunTimeTypeDictionary & GetRunTimeDictionary(); -extern "C" EXPCL_DTOOL RunTimeTypeList & GetRunTimeTypeList(); +EXPCL_DTOOLCONFIG RunTimeTypeDictionary & GetRunTimeDictionary(); +EXPCL_DTOOLCONFIG RunTimeTypeList & GetRunTimeTypeList(); #endif diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index 3f57e47c4e..a016553f94 100755 --- a/dtool/src/interrogatedb/py_panda.h +++ b/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 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