swig/SWIG/Examples/test-suite/preproc_6.i
Logan Johnson 74056cb11b *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4703 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-25 15:03:40 +00:00

19 lines
564 B
OpenEdge ABL

%module preproc_6
%warnfilter(801) a; /* Ruby, wrong constant name */
%warnfilter(801) b; /* Ruby, wrong constant name */
%warnfilter(801) c; /* Ruby, wrong constant name */
%warnfilter(801) d; /* Ruby, wrong constant name */
#define add(a, b) (a + b)
#define times(a, b) (a * b)
#define op(x) x(1, 5)
/* expand to (1 + 5) */
%constant int a = op(add);
/* expand to (1 * 5) */
%constant int b = op(times);
/* expand to ((1 + 5) * 5) */
%constant int c = times(add(1, 5), 5);
/* expand to ((1 + 5) * 5) */
%constant int d = times(op(add), 5);