update swig on windows
This commit is contained in:
27
winx64/bin/swigwin-4.0.0/Examples/python/exception/example.i
Normal file
27
winx64/bin/swigwin-4.0.0/Examples/python/exception/example.i
Normal file
@@ -0,0 +1,27 @@
|
||||
/* File : example.i */
|
||||
%module example
|
||||
|
||||
%{
|
||||
#include "example.h"
|
||||
%}
|
||||
|
||||
%include "std_string.i"
|
||||
|
||||
%catches(int) Test::simple();
|
||||
%catches(const char *) Test::message();
|
||||
%catches(Exc) Test::hosed();
|
||||
%catches(A*) Test::unknown();
|
||||
%catches(int, const char *, Exc) Test::multi(int x);
|
||||
|
||||
/* 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
|
||||
%}
|
||||
|
||||
Reference in New Issue
Block a user