Cpp wrapper: fix bug concerning 'void *'

This commit is contained in:
François Grisez 2017-02-08 13:49:20 +01:00
parent aa80b003cc
commit b82742a5f0

View file

@ -273,7 +273,7 @@ class CppTranslator(object):
if type(exprtype) is AbsApi.BaseType:
if exprtype.name == 'string':
cExpr = 'cppStringToC({0})'.format(cppExpr);
elif exprtype not in ['void', 'string', 'string_array'] and exprtype.isref:
elif exprtype.name not in ['void', 'string', 'string_array'] and exprtype.isref:
cExpr = '&' + cppExpr
else:
cExpr = cppExpr