aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/macro_2.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/macro_2.i')
-rw-r--r--Examples/test-suite/macro_2.i22
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/test-suite/macro_2.i b/Examples/test-suite/macro_2.i
new file mode 100644
index 000000000..1862bc75a
--- /dev/null
+++ b/Examples/test-suite/macro_2.i
@@ -0,0 +1,22 @@
+/* This interface file tests whether SWIG's extended C
+ preprocessor is working right.
+
+ In this example, SWIG 1.3a5 reports missing macro arguments, which
+ is bogus.
+*/
+
+%define FOO(C_TYPE, GETLENGTH)
+ /* nothing */
+%enddef
+
+%define BAR(XYZZY)
+ FOO(XYZZY, 1)
+%enddef
+
+BAR(int)
+
+%module macro_2
+
+%inline %{
+ int dummy_var;
+%}