diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-11-05 15:12:03 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-11-05 15:12:03 +0000 |
commit | 4a477a2c7ccf32f0c56a2e1348217ef67bdae0cb (patch) | |
tree | 97bb2f125823efac6e93a24f0afe52e58f1e3126 /src/DumpUtils.c | |
parent | ce402fb886c3764cb3594fbf1272bab7070de89e (diff) |
Added const qualifier to the 'cGH *' argument of some more IO functions.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@44 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src/DumpUtils.c')
-rw-r--r-- | src/DumpUtils.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c index 3aaa6b2..d44873c 100644 --- a/src/DumpUtils.c +++ b/src/DumpUtils.c @@ -34,12 +34,12 @@ CCTK_FILEVERSION(BetaThorns_IOHDF5Util_DumpUtils_c) @enddesc @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var timers @vdesc array of timers for timing the checkpointing - @vtype int [] + @vtype const int * @vio in @endvar @var file @@ -53,8 +53,8 @@ CCTK_FILEVERSION(BetaThorns_IOHDF5Util_DumpUtils_c) always 0 (for success) @endreturndesc @@*/ -int IOHDF5Util_DumpGH (cGH *GH, - int timers[], +int IOHDF5Util_DumpGH (const cGH *GH, + const int *timers, hid_t file) { DECLARE_CCTK_PARAMETERS @@ -65,7 +65,15 @@ int IOHDF5Util_DumpGH (cGH *GH, int old_out_single; ioGH *ioUtilGH; ioHDF5Geo_t request; + /*** FIXME: can CCTK_SyncGroup() have a 'const cGH *' parameter ?? ***/ + union + { + const cGH *const_ptr; + cGH *non_const_ptr; + } GH_fake_const; + + GH_fake_const.const_ptr = GH; /* Get the GH extension for IOUtil */ ioUtilGH = (ioGH *) CCTK_GHExtension (GH, "IO"); @@ -93,7 +101,7 @@ int IOHDF5Util_DumpGH (cGH *GH, if (CCTK_IsImplementationActive ( CCTK_ImpFromVarI (CCTK_FirstVarIndexI (vindex)))) { - CCTK_SyncGroupI (GH, vindex); + CCTK_SyncGroupI (GH_fake_const.non_const_ptr, vindex); } } @@ -140,7 +148,7 @@ int IOHDF5Util_DumpGH (cGH *GH, } /* sync the group */ - CCTK_SyncGroupI (GH, gindex); + CCTK_SyncGroupI (GH_fake_const.non_const_ptr, gindex); /* dump all timelevels except the oldest (for multi-level groups) */ CCTK_GroupData (gindex, &gdata); @@ -211,7 +219,7 @@ int IOHDF5Util_DumpGH (cGH *GH, @enddesc @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var vindex @@ -240,11 +248,11 @@ int IOHDF5Util_DumpGH (cGH *GH, @vio in @endvar @@*/ -void IOHDF5Util_DumpCommonAttributes (cGH *GH, +void IOHDF5Util_DumpCommonAttributes (const cGH *GH, int vindex, int timelevel, - CCTK_INT global_shape[], - ioHDF5Geo_t *request, + const CCTK_INT *global_shape, + const ioHDF5Geo_t *request, hid_t dataset) { DECLARE_CCTK_PARAMETERS @@ -352,7 +360,7 @@ void IOHDF5Util_DumpCommonAttributes (cGH *GH, @enddesc @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var file @@ -361,7 +369,7 @@ void IOHDF5Util_DumpCommonAttributes (cGH *GH, @vio in @endvar @@*/ -void IOHDF5Util_DumpParameters (cGH *GH, +void IOHDF5Util_DumpParameters (const cGH *GH, hid_t file) { DECLARE_CCTK_PARAMETERS @@ -404,7 +412,7 @@ void IOHDF5Util_DumpParameters (cGH *GH, @enddesc @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var file @@ -413,7 +421,7 @@ void IOHDF5Util_DumpParameters (cGH *GH, @vio in @endvar @@*/ -void IOHDF5Util_DumpGHExtensions (cGH *GH, +void IOHDF5Util_DumpGHExtensions (const cGH *GH, hid_t file) { DECLARE_CCTK_PARAMETERS |