Defining the aliases by default results in conflicts when including headers from multiple modules as e.g. SWIG_PendingException_get() is defined in all of them, and could also easily result in other unwanted clashes, so make this opt-in and update the examples and tests relying on using the wrappers without the module prefix to define SWIG_DEFINE_WRAPPER_ALIASES explicitly.
15 lines
No EOL
280 B
C
15 lines
No EOL
280 B
C
#include <assert.h>
|
|
|
|
#define SWIG_DEFINE_WRAPPER_ALIASES
|
|
#include "c_backend_cpp_exception/c_backend_cpp_exception_wrap.h"
|
|
|
|
int main()
|
|
{
|
|
assert(checkVal == 0);
|
|
throwSomeKnownException();
|
|
assert(checkVal == 1);
|
|
throwSomeUnknownException();
|
|
assert(checkVal == 2);
|
|
|
|
return 0;
|
|
} |