@@ -32,30 +32,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
32
#ifndef ECSPYTHON_H
33
33
#define ECSPYTHON_H
34
34
35
- #ifdef _WIN32
36
-
37
- #ifdef ECS_EXPORT
38
- #define DLLPORT __declspec (dllexport)
39
- #else
40
- #define DLLPORT __declspec (dllimport)
41
- #endif
42
-
43
- #else
44
-
45
- #define DLLPORT
46
-
47
- #endif
48
-
49
- #include < ecspython/EcsMacros.h>
50
35
#include < dspatch/DspThread.h>
36
+ #include < ecspython/EcsMacros.h>
51
37
52
38
struct PyMethodDef ;
53
39
54
40
// =================================================================================================
55
41
// EcsPython Globals
56
42
// =================
57
43
58
- struct DLLEXPORT EcsClass
44
+ struct EcsClass
59
45
{
60
46
EcsClass ( std::string newPyClassName, const std::type_info& newPyClassType )
61
47
: pyClassName( newPyClassName ),
@@ -65,7 +51,7 @@ struct DLLEXPORT EcsClass
65
51
const std::type_info& pyClassType;
66
52
};
67
53
68
- struct DLLEXPORT EcsObject
54
+ struct EcsObject
69
55
{
70
56
EcsObject ( char * newPyObject, std::string newPyClassName, std::string newPyObjectName )
71
57
: pyObject( newPyObject ),
@@ -77,54 +63,54 @@ struct DLLEXPORT EcsObject
77
63
std::string pyObjectName;
78
64
};
79
65
80
- DLLPORT extern DspMutex EcsPythonCmdMutex; // Mutex for thread-safe python calls
81
- DLLPORT extern std::vector< EcsClass* > EcsPythonClassesDict; // C++ class dictionary
82
- DLLPORT extern std::string EcsPythonClassesDef; // Python definition string for C++ classes
83
- DLLPORT extern std::vector< PyMethodDef > EcsPythonMethods; // Methods for EcsPython python module
84
- DLLPORT extern std::vector< EcsObject* > EcsExposedObjects; // C++ objects exposed to Python
66
+ extern DspMutex EcsPythonCmdMutex; // Mutex for thread-safe python calls
67
+ extern std::vector< EcsClass* > EcsPythonClassesDict; // C++ class dictionary
68
+ extern std::string EcsPythonClassesDef; // Python definition string for C++ classes
69
+ extern std::vector< PyMethodDef > EcsPythonMethods; // Methods for EcsPython python module
70
+ extern std::vector< EcsObject* > EcsExposedObjects; // C++ objects exposed to Python
85
71
86
72
#if PY_MAJOR_VERSION >= 3
87
- DLLPORT extern struct PyModuleDef EcsPythonModule; // EcsPython python module
73
+ extern struct PyModuleDef EcsPythonModule; // EcsPython python module
88
74
#endif
89
75
90
76
// =================================================================================================
91
77
// Initialize EcsPython
92
78
// ====================
93
79
94
- DLLEXPORT void Ecs_Initialize ();
80
+ void Ecs_Initialize ();
95
81
96
82
// -------------------------------------------------------------------------------------------------
97
83
// Finalize EcsPython
98
84
// ==================
99
85
100
- DLLEXPORT void Ecs_Finalize ();
86
+ void Ecs_Finalize ();
101
87
102
88
// -------------------------------------------------------------------------------------------------
103
89
// Execute Python Command
104
90
// ======================
105
91
106
- DLLEXPORT void Ecs_Python_Cmd ( std::string pythonCmdString );
92
+ void Ecs_Python_Cmd ( std::string pythonCmdString );
107
93
108
94
// -------------------------------------------------------------------------------------------------
109
95
// Execute Python File
110
96
// ===================
111
97
112
- DLLEXPORT void Ecs_Python_File ( std::string pythonScriptPath );
98
+ void Ecs_Python_File ( std::string pythonScriptPath );
113
99
114
100
// -------------------------------------------------------------------------------------------------
115
101
// Get Object Value From Python
116
102
// ============================
117
103
118
- DLLEXPORT std::string Ecs_Get_Value ( std::string pyObjectName );
104
+ std::string Ecs_Get_Value ( std::string pyObjectName );
119
105
120
106
// -------------------------------------------------------------------------------------------------
121
107
// Expose Class Instance To Python
122
108
// ===============================
123
109
124
- DLLEXPORT void _Ecs_Expose_Object ( char * pyObject, std::string pyClassName, std::string pyObjectName );
110
+ void _Ecs_Expose_Object ( char * pyObject, std::string pyClassName, std::string pyObjectName );
125
111
126
112
template < class ObjectType >
127
- DLLEXPORT void Ecs_Expose_Object ( ObjectType* object, std::string pyObjectName )
113
+ void Ecs_Expose_Object ( ObjectType* object, std::string pyObjectName )
128
114
{
129
115
for ( unsigned long i = 0 ; i < EcsPythonClassesDict.size (); i++ )
130
116
{
0 commit comments