summaryrefslogtreecommitdiffstats
path: root/Source/cmVTKWrapPythonCommand.cxx
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-05-31 18:15:55 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2001-05-31 18:15:55 (GMT)
commit6b37e97caee06e5a2b80798cd2c1cbe5e9c7569b (patch)
tree5205bd6e474605b098e4e7823f89ea69744546b9 /Source/cmVTKWrapPythonCommand.cxx
parenta85e67d937140880d73a9ae7d7cabded366a14a6 (diff)
downloadCMake-6b37e97caee06e5a2b80798cd2c1cbe5e9c7569b.zip
CMake-6b37e97caee06e5a2b80798cd2c1cbe5e9c7569b.tar.gz
CMake-6b37e97caee06e5a2b80798cd2c1cbe5e9c7569b.tar.bz2
Should not use decl if not on Windows.
Diffstat (limited to 'Source/cmVTKWrapPythonCommand.cxx')
-rw-r--r--Source/cmVTKWrapPythonCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmVTKWrapPythonCommand.cxx b/Source/cmVTKWrapPythonCommand.cxx
index b138422..4baf968 100644
--- a/Source/cmVTKWrapPythonCommand.cxx
+++ b/Source/cmVTKWrapPythonCommand.cxx
@@ -194,14 +194,22 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName,
for (i = 0; i < classes.size(); i++)
{
+#ifdef _WIN32
fprintf(fout,"extern \"C\" {__declspec( dllexport) PyObject *PyVTKClass_%sNew(char *); }\n",classes[i].c_str());
+#else
+ fprintf(fout,"extern \"C\" {PyObject *PyVTKClass_%sNew(char *); }\n",classes[i].c_str());
+#endif
}
fprintf(fout,"\nstatic PyMethodDef Py%s_ClassMethods[] = {\n",
kitName);
fprintf(fout,"{NULL, NULL}};\n\n");
+#ifdef _WIN32
fprintf(fout,"extern \"C\" {__declspec( dllexport) void init%s();}\n\n",kitName);
+#else
+ fprintf(fout,"extern \"C\" {void init%s();}\n\n",kitName);
+#endif
/* module init function */