update swig on windows
This commit is contained in:
23
winx64/bin/swigwin-4.0.0/Examples/lua/exception/example.i
Normal file
23
winx64/bin/swigwin-4.0.0/Examples/lua/exception/example.i
Normal file
@@ -0,0 +1,23 @@
|
||||
/* File : example.i */
|
||||
%module example
|
||||
|
||||
%{
|
||||
#include "example.h"
|
||||
%}
|
||||
|
||||
%include "std_string.i"
|
||||
|
||||
// we want to return Exc objects to the interpreter
|
||||
// therefore we add this typemap
|
||||
// note: only works if Exc is copyable
|
||||
%apply SWIGTYPE EXCEPTION_BY_VAL {Exc};
|
||||
|
||||
%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"
|
||||
|
||||
Reference in New Issue
Block a user