summaryrefslogtreecommitdiff
path: root/Examples/test-suite/import_nomodule.i
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-03-08 18:15:18 +1300
committerOlly Betts <olly@survex.com>2022-03-08 18:15:18 +1300
commitf8a766295ca4104e5d89904cba87c6303f100b50 (patch)
tree1685b40a6b747b64744c0a4553343b8a85839b8d /Examples/test-suite/import_nomodule.i
parent663299281ebbadbe78781cc369dafd63c3fa3219 (diff)
downloadswig-f8a766295ca4104e5d89904cba87c6303f100b50.tar.gz
Handle `)` in command line interface filename
SWIG now handles an interface filename specified on the command line which contains a closing parenthesis `)`, and more generally with attributes to `%include` and `%import` which are quoted and contain parentheses. Fixes #1006
Diffstat (limited to 'Examples/test-suite/import_nomodule.i')
-rw-r--r--Examples/test-suite/import_nomodule.i4
1 files changed, 3 insertions, 1 deletions
diff --git a/Examples/test-suite/import_nomodule.i b/Examples/test-suite/import_nomodule.i
index 48e119517..2794ad5f3 100644
--- a/Examples/test-suite/import_nomodule.i
+++ b/Examples/test-suite/import_nomodule.i
@@ -6,7 +6,9 @@
// For Python
%warnfilter(SWIGWARN_TYPE_UNDEFINED_CLASS) Bar; // Base class 'Foo' ignored - unknown module name for base. Either import the appropriate module interface file or specify the name of the module in the %import directive.
-%import "import_nomodule.h"
+// The "dummy=" attribute is a regression test for #1006, fixed in SWIG 4.1.0.
+// SWIG didn't used to take quoting into account when finding the closing `)`.
+%import(dummy=")foo\"") "import_nomodule.h"
#if !defined(SWIGJAVA) && !defined(SWIGRUBY) && !defined(SWIGCSHARP) && !defined(SWIGD) && !defined(SWIGPYTHON_BUILTIN) && !defined(SWIGPHP)