Skip to content

Commit f8feb39

Browse files
committed
'extern "C"' not needed here
1) 'extern "C"' not needed here 2) We need to adhere to AMUSE standards, I guess the legacy decorator implies that we need to set an argument 'int * value' and '*value = jd->get_nj_max(); return 0;' or we will be returned an empty list instead of an integer. 3) As a consequence of 2) we need to add an argument to the function: 'function.addParameter(...'.
1 parent a10558b commit f8feb39

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/amuse_ph4/interface.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,11 @@ def recompute_timesteps():
464464
function.result_type = 'int32'
465465
return function
466466

467+
@legacy_function
467468
def get_nj_max():
468469
function = LegacyFunctionSpecification()
470+
function.addParameter('nj_max', dtype='int32',
471+
direction=function.OUT)
469472
function.result_type = 'int32'
470473
return function
471474

0 commit comments

Comments
 (0)