summaryrefslogtreecommitdiff
path: root/lib/sbin/create_c_stuff.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sbin/create_c_stuff.pl')
-rw-r--r--lib/sbin/create_c_stuff.pl12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl
index 124fd560..3277c15f 100644
--- a/lib/sbin/create_c_stuff.pl
+++ b/lib/sbin/create_c_stuff.pl
@@ -172,11 +172,10 @@ sub GetThornParameterList
sub CreateCStructureParameterHeader
{
my($prefix, $structure, $rhparameters, $rhparameter_db) = @_;
- my($line,@data,@use);
+ my($line,@data);
my(%parameters);
my($type, $type_string);
my(@definition);
- my(@use);
# Create the structure
push(@data, '#ifdef __cplusplus');
@@ -207,8 +206,7 @@ sub CreateCStructureParameterHeader
my $realname = $rhparameter_db->{"\U$rhparameters->{$parameter} $parameter\E realname"};
push(@data, " $type_string $realname$suffix;");
- push(@definition, " $type_string$varprefix const $parameter = $structure.$realname; \\");
- push(@use, " $delim dummy\_$structure\_$parameter = sizeof( $parameter ) \\");
+ push(@definition, " CCTK_DECLARE_INIT ($type_string$varprefix const, $parameter, $structure.$realname); \\");
$delim = ',';
}
@@ -228,12 +226,6 @@ sub CreateCStructureParameterHeader
push(@data, "#define DECLARE_${structure}_PARAMS \\");
push(@data, @definition);
- if( @use )
- {
- push(@data, " enum { \\");
- push(@data, @use);
- push(@data, " }; \\");
- }
push(@data, "\n"); # workaround for perl 5.004_04 to add a trailing newline