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
This commit is contained in:
Olly Betts 2022-03-08 18:15:18 +13:00
commit f8a766295c
3 changed files with 36 additions and 7 deletions

View file

@ -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)