Commit adc57abf authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Handle multiple methods with same name the right way in Java wrapper

parent a021e774
......@@ -216,8 +216,8 @@ class JavaTranslator(object):
methodDict['name'] = _method.name.to_camel_case(lower=True)
methodDict['name_native'] = methodDict['name']
if _method.name.to_c()[-1] == '2':
methodDict['name_native'] += "2"
if _method.name.to_c()[-1].isdigit():
methodDict['name_native'] += _method.name.to_c()[-1]
methodDict['isNotGetCore'] = not methodDict['name'] == 'getCore'
methodDict['hasCoreAccessor'] = _hasCoreAccessor
......@@ -263,8 +263,8 @@ class JavaTranslator(object):
methodDict['isConstList'] = _method.returnType.isconst
methodDict['isNotConstList'] = not _method.returnType.isconst
if _method.name.to_c()[-1] == '2':
methodDict['name'] += "2"
if _method.name.to_c()[-1].isdigit():
methodDict['name'] += _method.name.to_c()[-1]
if _method.name.to_c() == 'linphone_factory_create_core':
methodDict['c_name'] = 'linphone_factory_create_core_3'
......
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