Commit 9f9cd52e authored by DanmeiChen's avatar DanmeiChen

fix null string crash

parent 34f9270a
......@@ -159,7 +159,7 @@ class SwiftTranslator(object):
delegate_name_public = method.name.translate(self.nameTranslator) + "Delegate"
listenerDict['delegate'] = {}
listenerDict['delegate']['cb_name'] = method.name.to_snake_case()
listenerDict['delegate']['cb_name'] = method.name.translate(self.nameTranslator)
listenerDict['delegate']['interfaceClassName'] = listenedClass.name.translate(self.nameTranslator)
listenerDict['delegate']['type'] = method.returnType.translate(self.langTranslator, dllImport=False)
......@@ -195,7 +195,8 @@ class SwiftTranslator(object):
listenerDict['delegate']['classLists']['argName'] = argName
listenerDict['delegate']['params'] += argName + ": " + argName + "sList"
elif normalType == "String":
listenerDict['delegate']['params'] += argName + ": charArrayToString(charPointer: " + argName +")!"
listenerDict['delegate']['params'] += argName + ": charArrayToString(charPointer: " + argName +")"
normalType = "String?"
elif normalType == "Int":
listenerDict['delegate']['params'] += argName + ": Int(" + argName + ")"
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment