diff options
author | Olly Betts <olly@survex.com> | 2022-07-27 12:25:27 +1200 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2022-07-27 12:25:27 +1200 |
commit | 0ff9a0959ab0fc537c7db53fb94efb7534b45925 (patch) | |
tree | 7f2771a0cd2947de9f431048a067a975306f5dc2 /Source/Swig | |
parent | 2227dc9e53dfe7aa236523058de139b5b3d5b6cc (diff) | |
download | swig-0ff9a0959ab0fc537c7db53fb94efb7534b45925.tar.gz |
Modify fix for << in array size
The previous fix broke testcase arrays for Go.
Diffstat (limited to 'Source/Swig')
-rw-r--r-- | Source/Swig/typesys.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Swig/typesys.c b/Source/Swig/typesys.c index 464b89f28..710688a0f 100644 --- a/Source/Swig/typesys.c +++ b/Source/Swig/typesys.c @@ -1702,9 +1702,7 @@ void SwigType_remember_clientdata(const SwigType *t, const_String_or_char_ptr cl if (t) { char *ct = Char(t); - const char *lt = strchr(ct, '<'); - /* Allow for `<<` operator in constant expression for array size. */ - if (lt && lt[1] != '(' && lt[1] != '<') { + if (strchr(ct, '<') && !(strstr(ct, "<("))) { Printf(stdout, "Bad template type passed to SwigType_remember: %s\n", t); assert(0); } |