swig/Examples/test-suite/preproc_6.i
Dave Beazley c1fa05651a new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4697 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-21 01:34:32 +00:00

14 lines
355 B
OpenEdge ABL

%module preproc_6
#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);