From 808d4b4798685dbbc8515277faa573c7ce40fbc2 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 7 Oct 2014 20:13:32 +0100 Subject: Bypass Python exmples not supported by -builtin Builtin classes as exceptions not supported, so don't run these aspects of the examples when using -builtin. --- Examples/python/exception/example.i | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Examples/python/exception/example.i') 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 +%} + -- cgit v1.2.1