diff options
author | rideout <rideout@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-06 14:49:54 +0000 |
---|---|---|
committer | rideout <rideout@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-06 14:49:54 +0000 |
commit | 059e31a5c33df185a94d40345ab0b8bd45535f70 (patch) | |
tree | 988bf174fb35e8caeb3e7ba3ef915fe3a7c7953f /lib/sbin/CreateFunctionBindings.pl | |
parent | f6c92afa44e4bc7fae927ad68aff52a263ca4db7 (diff) |
Fix grdoc header.
Fix return type void functions. (Patch from Ian Hawke.)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3162 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CreateFunctionBindings.pl')
-rw-r--r-- | lib/sbin/CreateFunctionBindings.pl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/sbin/CreateFunctionBindings.pl b/lib/sbin/CreateFunctionBindings.pl index 8dd2827c..64ed4f15 100644 --- a/lib/sbin/CreateFunctionBindings.pl +++ b/lib/sbin/CreateFunctionBindings.pl @@ -698,7 +698,7 @@ sub RegisterAllFunctions my(@data)=(); push(@data, '/*@@'); - push(@data, ' @file RegisterAllFunctions.c'); + push(@data, ' @file RegisterThornFunctions.c'); push(@data, ' @author Automatically generated by CreateFunctionBindings.pl'); push(@data, ' @desc'); push(@data, ' Register aliased functions from active thorns'); @@ -738,6 +738,8 @@ sub RegisterAllFunctions push(@data,"{"); push(@data," CCTK_INT retval;"); push(@data,""); + push(@data," retval = 0;"); + push(@data,""); foreach $thorn (keys %FunctionDatabase) { @@ -1140,7 +1142,7 @@ sub printAliasToWrapper push(@data," $rettype retval;"); push(@data,''); } else { - print 'rettype vopid!!\n'; +# print 'rettype void!!\n'; } my $nstrings = ""; @@ -1842,8 +1844,16 @@ sub ProvidedFunctions push(@data,@FnPtrSets); push(@data,""); } - push(@data," return CCTK_FCALL CCTK_FNAME(${provider})(@{fseq});"); - push(@data,"}"); +# push(@data," return CCTK_FCALL CCTK_FNAME(${provider})(@{fseq});"); + if ($rettype ne 'void') + { + push(@data," return CCTK_FCALL CCTK_FNAME(${provider})(@{fseq});"); + } + else + { + push(@data," CCTK_FCALL CCTK_FNAME(${provider})(@{fseq});"); + } + push(@data,"}"); } else # providetype is C { |