diff options
author | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2001-11-05 15:01:00 +0000 |
---|---|---|
committer | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2001-11-05 15:01:00 +0000 |
commit | aefccf7f6c7d23f01120009ea144546575cdd289 (patch) | |
tree | 0f765c9a263c807e27881c02a4920602cb97f61e /src/WriteInfo.c | |
parent | 99faa32c501ebb610aa7d40e55b714272bb785d8 (diff) |
Added const qualifier to the 'cGH *' argument of some more IO functions.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@105 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src/WriteInfo.c')
-rw-r--r-- | src/WriteInfo.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/WriteInfo.c b/src/WriteInfo.c index 3345161..37a986d 100644 --- a/src/WriteInfo.c +++ b/src/WriteInfo.c @@ -32,13 +32,22 @@ CCTK_FILEVERSION(CactusBase_IOBasic_WriteInfo_c) @calls CCTK_VarDataPtrI CCTK_Reduce @@*/ -void IOBasic_WriteInfo (cGH *GH, int vindex) +void IOBasic_WriteInfo (const cGH *GH, int vindex) { int vtype; char *fullname; iobasicGH *myGH; void *ptr; iobasic_reduction_t *reduction; + /*** FIXME: can CCTK_Reduce() have a 'const cGH *' parameter ?? ***/ + union + { + const cGH *const_ptr; + cGH *non_const_ptr; + } GH_fake_const; + + + GH_fake_const.const_ptr = GH; myGH = (iobasicGH *) CCTK_GHExtension (GH, "IOBasic"); @@ -152,7 +161,8 @@ void IOBasic_WriteInfo (cGH *GH, int vindex) /* for CCTK_GF and CCTK_ARRAY variables: loop over all reductions */ while (reduction) { - reduction->is_valid = CCTK_Reduce (GH, 0, reduction->handle, 1, + reduction->is_valid = CCTK_Reduce (GH_fake_const.non_const_ptr, 0, + reduction->handle, 1, CCTK_VARIABLE_REAL, &reduction->value, 1, vindex) == 0; if (! reduction->is_valid) |