1
%module extern_declaration
3
// Test different calling conventions on Windows. Old versions of SWIG generated
4
// an incorrect extern declaration that wouldn't compile with Windows compilers.
10
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
11
# define MYDLLIMPORT __declspec(dllimport)
17
MYDLLIMPORT extern int externimport(int i);
18
SWIGEXPORT extern int externexport(int);
19
extern int SWIGSTDCALL externstdcall(int);
22
// externimport ought to be using MYDLLIMPORT and compiled into another dll, but that is
23
// a bit tricky to do in the test framework
24
SWIGEXPORT extern int externimport(int i) { return i; }
25
SWIGEXPORT extern int externexport(int i) { return i; }
26
extern int SWIGSTDCALL externstdcall(int i) { return i; }