summaryrefslogtreecommitdiff
path: root/Examples
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2014-12-20 16:56:31 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2014-12-20 17:05:13 +0000
commit93d58cd3ed1cc2cf0490e95d43eed4e8de62763d (patch)
tree3d8613f7f17002016a4454f77945f9e2be679111 /Examples
parent68a936a63865eced4f9029c28d4fa7a13b538e0e (diff)
downloadswig-93d58cd3ed1cc2cf0490e95d43eed4e8de62763d.tar.gz
Fix use of preprocessor null directive
This was broken recently in commit 255c929c5636f54c16261bd92b8eea2005d61b11 for issue #217
Diffstat (limited to 'Examples')
-rw-r--r--Examples/test-suite/preproc.i17
-rw-r--r--Examples/test-suite/python/preproc_runme.py2
2 files changed, 19 insertions, 0 deletions
diff --git a/Examples/test-suite/preproc.i b/Examples/test-suite/preproc.i
index e052bff28..779c41e97 100644
--- a/Examples/test-suite/preproc.i
+++ b/Examples/test-suite/preproc.i
@@ -346,3 +346,20 @@ int method(struct TypeNameTraits tnt) {
return tnt.val;
}
%}
+
+/* Null directive */
+# /* comment 1 */
+# // comment 2
+# /** comment 3 */
+# /* comment 4 */ /*comment 5*/
+# /** comment 6
+#
+# more comment 6 */
+#
+#
+#
+int methodX(int x);
+%{
+int methodX(int x) { return x+100; }
+%}
+
diff --git a/Examples/test-suite/python/preproc_runme.py b/Examples/test-suite/python/preproc_runme.py
index c989294b6..3049f00ab 100644
--- a/Examples/test-suite/python/preproc_runme.py
+++ b/Examples/test-suite/python/preproc_runme.py
@@ -12,3 +12,5 @@ if preproc.defined != 1:
if 2*preproc.one != preproc.two:
raise RuntimeError
+if preproc.methodX(99) != 199:
+ raise RuntimeError