aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/preproc_2.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/preproc_2.i')
-rw-r--r--Examples/test-suite/preproc_2.i22
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/test-suite/preproc_2.i b/Examples/test-suite/preproc_2.i
new file mode 100644
index 000000000..ca5e4c1cb
--- /dev/null
+++ b/Examples/test-suite/preproc_2.i
@@ -0,0 +1,22 @@
+/* This SWIG -*- c -*- interface is to test for some strange
+ preprocessor bug.
+
+ I get syntax errors unless I remove the apostrophe in the comment
+ or the sharp-sign substitution. (The apostrophe seems to disable
+ sharp-sign substitution.)
+*/
+
+%module preproc_2;
+
+%define TYPEMAP_LIST_VECTOR_INPUT_OUTPUT(SCM_TYPE)
+
+ /* Don't check for NULL pointers (override checks). */
+
+ %typemap(argout, doc="($arg <vector of <" #SCM_TYPE ">>)")
+ int *VECTORLENOUTPUT
+ {
+ }
+
+%enddef
+
+TYPEMAP_LIST_VECTOR_INPUT_OUTPUT(boolean)