summaryrefslogtreecommitdiff
path: root/Examples/python/exception/example.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/python/exception/example.i')
-rw-r--r--Examples/python/exception/example.i9
1 files changed, 9 insertions, 0 deletions
diff --git a/Examples/python/exception/example.i b/Examples/python/exception/example.i
index 08672c3a8..817c5221c 100644
--- a/Examples/python/exception/example.i
+++ b/Examples/python/exception/example.i
@@ -10,3 +10,12 @@
/* Let's just grab the original header file here */
%include "example.h"
+%inline %{
+// The -builtin SWIG option results in SWIGPYTHON_BUILTIN being defined
+#ifdef SWIGPYTHON_BUILTIN
+bool is_python_builtin() { return true; }
+#else
+bool is_python_builtin() { return false; }
+#endif
+%}
+