Commit db23ca90 authored by François Grisez's avatar François Grisez
Browse files

C++ wrapper: syntax error in the generated C++ code

parent 16c2d33d
......@@ -408,7 +408,7 @@ class CParser(object):
self.cBaseType = ['void', 'bool_t', 'char', 'short', 'int', 'long', 'size_t', 'time_t', 'float', 'double']
self.cListType = 'bctbx_list_t'
self.regexFixedSizeInteger = '^(u?)int(\d?\d)_t$'
self.methodBl = ['ref', 'unref', 'new', 'destroy', 'getCurrentCallbacks']
self.methodBl = ['ref', 'unref', 'new', 'destroy', 'getCurrentCallbacks', 'setUserData', 'getUserData']
self.functionBl = ['linphone_tunnel_get_http_proxy',
'linphone_core_can_we_add_call',
'linphone_core_get_default_proxy',
......
......@@ -99,7 +99,7 @@ std::shared_ptr<Core> Factory::createCoreWithConfig(const std::shared_ptr<CoreLi
LinphoneCoreCbs *cbs = linphone_core_get_current_callbacks(lc);
CoreListener *listener = (CoreListener *)linphone_core_cbs_get_user_data(cbs);
{{/ismultilistenable}}
{{#hasReturnValue}}return {{/hasReturnValue}}{{{cppMethodCallingLine}}}
{{#hasReturnValue}}return {{/hasReturnValue}}{{{cppMethodCallingLine}}};
}
{{/wrapperCbs}}
......
......@@ -130,7 +130,7 @@ class CppTranslator(object):
wrapperCbDict['hasReturnValue'] = (params['returnType'] != 'void')
wrapperCbDict['hasNotReturnValue'] = not wrapperCbDict['hasReturnValue']
wrapperCbDict['callbackSetter'] = listenedClass.name.to_snake_case(fullName=True) + '_cbs_set_' + method.name.to_snake_case()[3:]
wrapperCbDict['cppMethodCallingLine'] = 'listener->{methodName}({wrappedArgs});'.format(
wrapperCbDict['cppMethodCallingLine'] = 'listener->{methodName}({wrappedArgs})'.format(
methodName=method.name.to_camel_case(lower=True),
wrappedArgs=', '.join(wrappedArgs))
wrapperCbDict['cppMethodCallingLine'] = CppTranslator._wrap_cpp_expression_to_c(self,
......
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