making binding generator output explicit void for functions with no parameters. Fix oc_surface_canvas/oc_surface_gles to take explicit void
This commit is contained in:
parent
d5bd7ea2bb
commit
549e640102
|
@ -61,6 +61,8 @@ def bindgen(apiName, spec, **kwargs):
|
|||
s += decl['ret']['name'] + '* __retArg'
|
||||
if len(decl['args']) > 0:
|
||||
s += ', '
|
||||
elif len(decl['args']) == 0:
|
||||
s += 'void'
|
||||
|
||||
for i, arg in enumerate(decl['args']):
|
||||
s += arg['type']['name']
|
||||
|
@ -73,6 +75,10 @@ def bindgen(apiName, spec, **kwargs):
|
|||
|
||||
# forward function to pointer arg stub declaration
|
||||
s += decl['ret']['name'] + ' ' + name + '('
|
||||
|
||||
if len(decl['args']) == 0:
|
||||
s += 'void'
|
||||
|
||||
for i, arg in enumerate(decl['args']):
|
||||
s += arg['type']['name'] + ' ' + arg['name']
|
||||
if i+1 < len(decl['args']):
|
||||
|
|
|
@ -110,8 +110,8 @@ ORCA_API void oc_surface_set_hidden(oc_surface surface, bool hidden);
|
|||
|
||||
#else
|
||||
|
||||
ORCA_API oc_surface oc_surface_canvas(); //DOC: creates a surface for use with the canvas API
|
||||
ORCA_API oc_surface oc_surface_gles(); //DOC: create a surface for use with GLES API
|
||||
ORCA_API oc_surface oc_surface_canvas(void); //DOC: creates a surface for use with the canvas API
|
||||
ORCA_API oc_surface oc_surface_gles(void); //DOC: create a surface for use with GLES API
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue