diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2013-12-25 14:01:41 -0800 |
---|---|---|
committer | jmarshallnz <jcmarsha@gmail.com> | 2013-12-25 14:01:41 -0800 |
commit | 820aa4df2dded16e1a9e8e5061f7080adf6c1cb0 (patch) | |
tree | eed9522b20519019518fe1ed3c27000c7864bffd /tools | |
parent | 98a50e87b99aba4e6a68b9caf55f6b63f81a20eb (diff) | |
parent | 20d7a92e6bcc90167f836be23b22268d3fc69d96 (diff) |
Merge pull request #3841 from jimfcarroll/fix-14546
Fix 14546 - ListItem.setInfo can handle additional types. Fixes #1456
Diffstat (limited to 'tools')
-rw-r--r-- | tools/codegenerator/Helper.groovy | 13 | ||||
-rw-r--r-- | tools/codegenerator/SwigTypeParser.groovy | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/tools/codegenerator/Helper.groovy b/tools/codegenerator/Helper.groovy index 1e98df05e0..8b471067f7 100644 --- a/tools/codegenerator/Helper.groovy +++ b/tools/codegenerator/Helper.groovy @@ -221,6 +221,11 @@ public class Helper if (!convertTemplate) { + // check the typedef resolution + String apiTypeResolved = SwigTypeParser.SwigType_resolve_all_typedefs(apiType) + if (!apiTypeResolved.equals(apiType)) + return getOutConversion(apiTypeResolved, apiName, method, overrideBindings, recurse) + if (recurse) return getOutConversion(SwigTypeParser.SwigType_ltype(apiType),apiName,method,overrideBindings,false) else if (!isKnownApiType(apiType,method)) @@ -339,7 +344,13 @@ public class Helper if (convertTemplate == null) convertTemplate = inTypemap.find({ key, value -> (key instanceof Pattern && key.matcher(apiLType).matches()) })?.value - if (!convertTemplate){ + if (!convertTemplate) + { + // check the typedef resolution + String apiTypeResolved = SwigTypeParser.SwigType_resolve_all_typedefs(apiType) + if (!apiTypeResolved.equals(apiType)) + return getInConversion(apiTypeResolved, apiName, paramName, slName, method, overrideBindings) + // it's ok if this is a known type if (!isKnownApiType(apiType,method) && !isKnownApiType(apiLType,method)) System.out.println("WARNING: Unknown parameter type: ${apiType} (or ${apiLType}) for the call ${Helper.findFullClassName(method) + '::' + Helper.callingName(method)}") diff --git a/tools/codegenerator/SwigTypeParser.groovy b/tools/codegenerator/SwigTypeParser.groovy index c7efb3f7d2..d079c485ed 100644 --- a/tools/codegenerator/SwigTypeParser.groovy +++ b/tools/codegenerator/SwigTypeParser.groovy @@ -348,6 +348,12 @@ public class SwigTypeParser return t.substring(start,c) } + public static List SwigType_templateparmlist(String t) + { + int i = t.indexOf('<'); + return SwigType_parmlist(t.substring(i)) + } + /* ----------------------------------------------------------------------------- * SwigType_parmlist() * |