summaryrefslogtreecommitdiff
path: root/linux-x86/share/swig/python/pyruntime.swg
diff options
context:
space:
mode:
Diffstat (limited to 'linux-x86/share/swig/python/pyruntime.swg')
-rw-r--r--linux-x86/share/swig/python/pyruntime.swg27
1 files changed, 27 insertions, 0 deletions
diff --git a/linux-x86/share/swig/python/pyruntime.swg b/linux-x86/share/swig/python/pyruntime.swg
new file mode 100644
index 0000000..751bc8d
--- /dev/null
+++ b/linux-x86/share/swig/python/pyruntime.swg
@@ -0,0 +1,27 @@
+%insert(runtime) %{
+#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
+/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
+# include <math.h>
+#endif
+
+#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
+/* Use debug wrappers with the Python release dll */
+# undef _DEBUG
+# include <Python.h>
+# define _DEBUG 1
+#else
+# include <Python.h>
+#endif
+%}
+
+%insert(runtime) "swigrun.swg"; /* SWIG API */
+%insert(runtime) "swigerrors.swg"; /* SWIG errors */
+%insert(runtime) "pyhead.swg"; /* Python includes and fixes */
+%insert(runtime) "pyerrors.swg"; /* Python errors */
+%insert(runtime) "pythreads.swg"; /* Python thread code */
+%insert(runtime) "pyapi.swg"; /* Python API */
+%insert(runtime) "pyrun.swg"; /* Python run-time code */
+
+#if defined(SWIGPYTHON_BUILTIN)
+%insert(runtime) "builtin.swg"; /* Specialization for classes with single inheritance */
+#endif