diff options
-rw-r--r-- | lib/sbin/CreateFunctionBindings.pl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/sbin/CreateFunctionBindings.pl b/lib/sbin/CreateFunctionBindings.pl index 7c507538..740ca21e 100644 --- a/lib/sbin/CreateFunctionBindings.pl +++ b/lib/sbin/CreateFunctionBindings.pl @@ -506,7 +506,7 @@ sub DummyThornFunctions # Header Data push(@data, '/*@@'); - push(@data, ' @header DummyThornFunctions.h'); + push(@data, ' @header DummyThornFunctions.c'); push(@data, ' @author Automatically generated by CreateFunctionBindings.pl'); push(@data, ' @desc'); push(@data, ' Dummy functions for overloaded thorn functions'); @@ -535,7 +535,7 @@ sub DummyThornFunctions foreach $arg (split(',',$function_db->{"$function CARGS"})) { $arg =~ m:.*\s+\**([^\s*\*]+)\s*:; - push(@data, " (void) ($1 + 0);"); + push(@data, " (void) (\&$1 + 0);"); } push(@data, ' CCTK_Warn(1, __LINE__, __FILE__, "Bindings",'); push(@data, " \"CCTKBindings_Dummy$function: Calling thorn function $function which has not been overloaded\");"); @@ -640,7 +640,7 @@ sub FortranThornFunctions # Header Data push(@data, '/*@@'); - push(@data, ' @header FortranThornFunctions.h'); + push(@data, ' @header FortranThornFunctions.c'); push(@data, ' @author Automatically generated by CreateFunctionBindings.pl'); push(@data, ' @desc'); push(@data, ' Fortran wrappers for overloaded thorn functions'); @@ -656,6 +656,14 @@ sub FortranThornFunctions push(@data, '#include "cctk_FortranString.h"'); push(@data, ''); + push(@data, "\n"); # workaround for perl 5.004_04 to add a trailing newline + + return join ("\n", @data); + +### FIXME: TR 6 Nov 2002 +### deactivated fortran wrapper code generation for alias functions +### since it's not working yet + # Do aliased function prototypes foreach $function (split(' ',$function_db->{'FUNCTIONS'})) { |