C++ wrapper: Unblacklist some class

This commit is contained in:
François Grisez 2017-03-27 13:40:16 +02:00
parent f5269c919d
commit bdde8f8802
2 changed files with 4 additions and 11 deletions

View file

@ -490,11 +490,7 @@ class CParser(object):
'linphone_core_get_sip_transports', # not wrappable
'linphone_core_get_sip_transports_used'] # not wrappable
self.classBl = ['LinphoneImEncryptionEngine',
'LinphoneImEncryptionEngineCbs',
'LinphoneImNotifPolicy',
'LpConfig',
'LinphoneErrorInfo',
self.classBl = ['LpConfig',
'LinphonePayloadType',
'LinphonePlayer'] # temporarly blacklisted

View file

@ -274,8 +274,6 @@ class CppTranslator(object):
if type(exprtype) is AbsApi.BaseType:
if exprtype.name == 'string':
cExpr = 'StringUtilities::cppStringToC({0})'.format(cppExpr);
elif exprtype.name not in ['void', 'string', 'string_array'] and exprtype.isref:
cExpr = '&' + cppExpr
else:
cExpr = cppExpr
elif type(exprtype) is AbsApi.EnumType:
@ -315,9 +313,7 @@ class CppTranslator(object):
def _wrap_c_expression_to_cpp(self, cExpr, exprtype, usedNamespace=None):
if type(exprtype) is AbsApi.BaseType:
if exprtype.name == 'void' and not exprtype.isref:
return cExpr
elif exprtype.name == 'string':
if exprtype.name == 'string':
return 'StringUtilities::cStringToCpp({0})'.format(cExpr)
elif exprtype.name == 'string_array':
return 'StringUtilities::cStringArrayToCppList({0})'.format(cExpr)
@ -391,6 +387,7 @@ class CppTranslator(object):
res = _type.size
else:
res = 'int{0}_t'.format(_type.size)
elif _type.name == 'floatant':
if _type.size is not None and _type.size == 'double':
res = 'double'
@ -418,7 +415,7 @@ class CppTranslator(object):
res = 'const ' + res
if _type.isref:
res += ' &'
res += ' *'
return res
def translate_enum_type(self, _type, **params):