Commit 987a978c authored by nnorwitz's avatar nnorwitz
Browse files

Issue 44: "const" is missing for const return types

The modifiers (things like const, volatile, etc) were not being added
to return types.
parent e7bb5ede
...@@ -54,7 +54,11 @@ def _GenerateMethods(output_lines, source, class_node): ...@@ -54,7 +54,11 @@ def _GenerateMethods(output_lines, source, class_node):
const = 'CONST_' const = 'CONST_'
return_type = 'void' return_type = 'void'
if node.return_type: if node.return_type:
return_type = node.return_type.name # Add modifier bits like const.
modifiers = ''
if node.return_type.modifiers:
modifiers = ' '.join(node.return_type.modifiers) + ' '
return_type = modifiers + node.return_type.name
if node.return_type.pointer: if node.return_type.pointer:
return_type += '*' return_type += '*'
if node.return_type.reference: if node.return_type.reference:
......
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