@@ -455,8 +455,8 @@ def f(a, b):
455
455
"which indicates which function should be called." )
456
456
457
457
# Build the function
458
- func = FunctionDef (name , [FunctionDefArgument (a ) for a in args ], [ FunctionDefResult ( type_indicator )] ,
459
- body , docstring = docstring , scope = func_scope )
458
+ func = FunctionDef (name , [FunctionDefArgument (a ) for a in args ], body ,
459
+ [ FunctionDefResult ( type_indicator )] , docstring = docstring , scope = func_scope )
460
460
461
461
return func , argument_type_flags
462
462
@@ -787,7 +787,7 @@ def _build_module_import_function(self, expr):
787
787
result = func_scope .get_temporary_variable (CNativeInt ())
788
788
self .exit_scope ()
789
789
self ._error_exit_code = Nil ()
790
- import_func = FunctionDef (func_name , (), (FunctionDefResult (result ),), body , is_static = True , scope = func_scope )
790
+ import_func = FunctionDef (func_name , (), body , (FunctionDefResult (result ),), is_static = True , scope = func_scope )
791
791
792
792
return API_var , import_func
793
793
@@ -883,8 +883,8 @@ def _get_class_allocator(self, class_dtype, func = None):
883
883
884
884
self .exit_scope ()
885
885
886
- return PyFunctionDef (func_name , func_args , func_results ,
887
- body , scope = func_scope , original_function = None )
886
+ return PyFunctionDef (func_name , func_args , body , func_results ,
887
+ scope = func_scope , original_function = None )
888
888
889
889
def _get_class_initialiser (self , init_function , cls_dtype ):
890
890
"""
@@ -980,7 +980,7 @@ def _get_class_initialiser(self, init_function, cls_dtype):
980
980
if not a .bound_argument :
981
981
self ._python_object_map .pop (a )
982
982
983
- function = PyFunctionDef (func_name , func_args , func_results , body , scope = func_scope ,
983
+ function = PyFunctionDef (func_name , func_args , body , func_results , scope = func_scope ,
984
984
docstring = init_function .docstring , original_function = original_func )
985
985
986
986
self .scope .functions [func_name ] = function
@@ -1046,7 +1046,7 @@ def _get_class_destructor(self, del_function, cls_dtype, wrapper_scope):
1046
1046
1047
1047
self .exit_scope ()
1048
1048
1049
- function = PyFunctionDef (func_name , [FunctionDefArgument (func_arg )], [], body , scope = func_scope ,
1049
+ function = PyFunctionDef (func_name , [FunctionDefArgument (func_arg )], body , scope = func_scope ,
1050
1050
original_function = original_func )
1051
1051
1052
1052
self .scope .functions [func_name ] = function
@@ -1225,24 +1225,24 @@ def _wrap_BindCModule(self, expr):
1225
1225
# Add external functions for functions wrapping array variables
1226
1226
for v in expr .variable_wrappers :
1227
1227
f = v .wrapper_function
1228
- external_funcs .append (FunctionDef (f .name , f .arguments , f .results , [] , is_header = True , scope = Scope ()))
1228
+ external_funcs .append (FunctionDef (f .name , f .arguments , [], f .results , is_header = True , scope = Scope ()))
1229
1229
1230
1230
# Add external functions for normal functions
1231
1231
for f in expr .funcs :
1232
- external_funcs .append (FunctionDef (f .name .lower (), f .arguments , f .results , [] , is_header = True , scope = Scope ()))
1232
+ external_funcs .append (FunctionDef (f .name .lower (), f .arguments , [], f .results , is_header = True , scope = Scope ()))
1233
1233
1234
1234
for c in expr .classes :
1235
1235
m = c .new_func
1236
- external_funcs .append (FunctionDef (m .name , m .arguments , m .results , [] , is_header = True , scope = Scope ()))
1236
+ external_funcs .append (FunctionDef (m .name , m .arguments , [], m .results , is_header = True , scope = Scope ()))
1237
1237
for m in c .methods :
1238
- external_funcs .append (FunctionDef (m .name , m .arguments , m .results , [] , is_header = True , scope = Scope ()))
1238
+ external_funcs .append (FunctionDef (m .name , m .arguments , [], m .results , is_header = True , scope = Scope ()))
1239
1239
for i in c .interfaces :
1240
1240
for f in i .functions :
1241
- external_funcs .append (FunctionDef (f .name , f .arguments , f .results , [] , is_header = True , scope = Scope ()))
1241
+ external_funcs .append (FunctionDef (f .name , f .arguments , [], f .results , is_header = True , scope = Scope ()))
1242
1242
for a in c .attributes :
1243
1243
for f in (a .getter , a .setter ):
1244
1244
if f :
1245
- external_funcs .append (FunctionDef (f .name , f .arguments , f .results , [] , is_header = True , scope = Scope ()))
1245
+ external_funcs .append (FunctionDef (f .name , f .arguments , [], f .results , is_header = True , scope = Scope ()))
1246
1246
pymod .external_funcs = external_funcs
1247
1247
1248
1248
return pymod
@@ -1326,8 +1326,8 @@ def _wrap_Interface(self, expr):
1326
1326
1327
1327
interface_func = FunctionDef (func_name ,
1328
1328
[FunctionDefArgument (a ) for a in func_args ],
1329
- [FunctionDefResult (self .get_new_PyObject ("result" , is_temp = True ))],
1330
1329
body ,
1330
+ [FunctionDefResult (self .get_new_PyObject ("result" , is_temp = True ))],
1331
1331
scope = func_scope )
1332
1332
for a in python_args :
1333
1333
self ._python_object_map .pop (a )
@@ -1467,7 +1467,7 @@ def _wrap_FunctionDef(self, expr):
1467
1467
if not a .bound_argument :
1468
1468
self ._python_object_map .pop (a )
1469
1469
1470
- function = PyFunctionDef (func_name , func_args , func_results , body , scope = func_scope ,
1470
+ function = PyFunctionDef (func_name , func_args , body , func_results , scope = func_scope ,
1471
1471
docstring = expr .docstring , original_function = original_func )
1472
1472
1473
1473
self .scope .functions [func_name ] = function
@@ -1712,7 +1712,7 @@ def _wrap_DottedVariable(self, expr):
1712
1712
self .exit_scope ()
1713
1713
1714
1714
args = [FunctionDefArgument (a ) for a in getter_args ]
1715
- getter = PyFunctionDef (getter_name , args , (FunctionDefResult (getter_result ),), getter_body ,
1715
+ getter = PyFunctionDef (getter_name , args , getter_body , (FunctionDefResult (getter_result ),),
1716
1716
original_function = expr , scope = getter_scope )
1717
1717
1718
1718
# ----------------------------------------------------------------------------------
@@ -1760,7 +1760,7 @@ def _wrap_DottedVariable(self, expr):
1760
1760
self .exit_scope ()
1761
1761
1762
1762
args = [FunctionDefArgument (a ) for a in setter_args ]
1763
- setter = PyFunctionDef (setter_name , args , setter_result , setter_body ,
1763
+ setter = PyFunctionDef (setter_name , args , setter_body , setter_result ,
1764
1764
original_function = expr , scope = setter_scope )
1765
1765
self ._error_exit_code = Nil ()
1766
1766
self ._python_object_map .pop (new_set_val_arg )
@@ -1840,7 +1840,7 @@ def _wrap_BindCClassProperty(self, expr):
1840
1840
self .exit_scope ()
1841
1841
1842
1842
args = [FunctionDefArgument (a ) for a in getter_args ]
1843
- getter = PyFunctionDef (getter_name , args , (FunctionDefResult (getter_result ),), getter_body ,
1843
+ getter = PyFunctionDef (getter_name , args , getter_body , (FunctionDefResult (getter_result ),),
1844
1844
original_function = expr .getter , scope = getter_scope )
1845
1845
1846
1846
# ----------------------------------------------------------------------------------
@@ -1886,7 +1886,7 @@ def _wrap_BindCClassProperty(self, expr):
1886
1886
self .exit_scope ()
1887
1887
1888
1888
args = [FunctionDefArgument (a ) for a in setter_args ]
1889
- setter = PyFunctionDef (setter_name , args , setter_result , setter_body ,
1889
+ setter = PyFunctionDef (setter_name , args , setter_body , setter_result ,
1890
1890
original_function = expr , scope = setter_scope )
1891
1891
else :
1892
1892
setter = None
0 commit comments