diff options
Diffstat (limited to 'tools/codegenerator')
-rw-r--r-- | tools/codegenerator/Helper.groovy | 4 | ||||
-rw-r--r-- | tools/codegenerator/SwigTypeParser.groovy | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/codegenerator/Helper.groovy b/tools/codegenerator/Helper.groovy index 7e54697770..7050d96ce4 100644 --- a/tools/codegenerator/Helper.groovy +++ b/tools/codegenerator/Helper.groovy @@ -186,7 +186,7 @@ public class Helper Node classNode = null if (convertTemplate == null && apiType.startsWith('p.')) { - classNode = findClassNodeByName(parents(method)[0], SwigTypeParser.getBaseType(apiType),method) + classNode = findClassNodeByName(parents(method)[0], SwigTypeParser.getRootType(apiType),method) if (classNode) convertTemplate = defaultOutTypeConversion } @@ -662,7 +662,7 @@ public class Helper */ public static boolean isKnownApiType(String type, Node searchFrom) { - String rootType = SwigTypeParser.getBaseType(type) + String rootType = SwigTypeParser.getRootType(type) return hasFeatureSetting(type,searchFrom,'feature_knownapitypes',{ it.split(',').find({ it == rootType }) != null }) } diff --git a/tools/codegenerator/SwigTypeParser.groovy b/tools/codegenerator/SwigTypeParser.groovy index 7b086541ee..229e89e2a7 100644 --- a/tools/codegenerator/SwigTypeParser.groovy +++ b/tools/codegenerator/SwigTypeParser.groovy @@ -52,7 +52,7 @@ public class SwigTypeParser * if the type string is p.MyType you will get MyType. If the string is * p.q(const).int you will get 'int' */ - public static String getBaseType(String ty) + public static String getRootType(String ty) { int li = ty.lastIndexOf('.') return li >= 0 ? ty.substring(li + 1) : ty |