swig/Examples/test-suite/c/global_vars_runme.c
Vadim Zeitlin 2f6f6df211 Generate wrapper aliases only if requested and not by default
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.
2021-10-20 01:57:20 +02:00

13 lines
235 B
C

#include <assert.h>
#include <string.h>
#include "global_vars/global_vars_wrap.h"
int main(int argc, const char *argv[])
{
global_vars_init();
assert(strcmp(b_get(), "string b") == 0);
assert(x == 1234);
return 0;
}