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.
16 lines
310 B
C
16 lines
310 B
C
#include <stdio.h>
|
|
|
|
#define SWIG_DEFINE_WRAPPER_ALIASES
|
|
#include "example_wrap.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
int a = 42;
|
|
int b = 105;
|
|
int g = gcd(a, b);
|
|
printf("The gcd of %d and %d is %d\n", a, b, g);
|
|
printf("Foo = %f\n", Foo);
|
|
Foo = 3.1415926;
|
|
printf("Foo = %f\n", Foo);
|
|
return 0;
|
|
}
|
|
|