aboutsummaryrefslogtreecommitdiff
path: root/Lib/linkruntime.c
diff options
context:
space:
mode:
authorJohn Lenz <jlenz2@math.uiuc.edu>2004-10-21 21:53:54 +0000
committerJohn Lenz <jlenz2@math.uiuc.edu>2004-10-21 21:53:54 +0000
commit0c57969c61e37911bcf6145d04cdcf2b5e3a96e6 (patch)
tree270c755885742234e949dd571f64fa7f33adef3e /Lib/linkruntime.c
parent8857b4db9ae85778558a7c4047681d2b441d7913 (diff)
downloadswig-0c57969c61e37911bcf6145d04cdcf2b5e3a96e6.tar.gz
- Add SWIG_RUNTIME_VERSION to new type sharing code. This is for future-proof, if
the format of swig_type_info ever changes, this number should be incremented - Add SWIG_LINK_RUNTIME and SWIG_STATIC_RUNTIME symbols to python - Convert inline into SWIGINLINE git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/linkruntime.c')
-rw-r--r--Lib/linkruntime.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/Lib/linkruntime.c b/Lib/linkruntime.c
new file mode 100644
index 000000000..89021fd2c
--- /dev/null
+++ b/Lib/linkruntime.c
@@ -0,0 +1,24 @@
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# if defined(_MSC_VER) || defined(__GNUC__)
+# if defined(STATIC_LINKED)
+# define SWIGEXPORT(a) a
+# else
+# define SWIGEXPORT(a) __declspec(dllexport) a
+# endif
+# else
+# if defined(__BORLANDC__)
+# define SWIGEXPORT(a) a _export
+# else
+# define SWIGEXPORT(a) a
+# endif
+# endif
+#else
+# define SWIGEXPORT(a) a
+#endif
+
+static void *ptr = 0;
+SWIGEXPORT(void *)
+SWIG_ReturnGlobalTypeList(void *t) {
+ if (!ptr) ptr = t;
+ return ptr;
+}