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.
This commit is contained in:
William S Fulton 2014-10-07 20:13:32 +01:00
commit 808d4b4798
4 changed files with 34 additions and 6 deletions

View file

@ -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
%}