aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/python_runtime_data_builtin.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python_runtime_data_builtin.i')
-rw-r--r--Examples/test-suite/python_runtime_data_builtin.i21
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/test-suite/python_runtime_data_builtin.i b/Examples/test-suite/python_runtime_data_builtin.i
new file mode 100644
index 000000000..546ccda52
--- /dev/null
+++ b/Examples/test-suite/python_runtime_data_builtin.i
@@ -0,0 +1,21 @@
+// Test swig_runtime_data with and without -builtin
+
+%module python_runtime_data_builtin
+
+%begin %{
+#if defined(Py_LIMITED_API)
+#undef Py_LIMITED_API // not yet supported by builtin
+#endif
+%}
+
+%inline %{
+#ifdef SWIGPYTHON_BUILTIN
+bool is_python_builtin() { return true; }
+#else
+bool is_python_builtin() { return false; }
+#endif
+%}
+
+%include std_vector.i
+
+%template(vectord) std::vector<double>;