diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2022-04-19 18:05:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 18:05:54 (GMT) |
commit | 32ef796e470da3e4de364d8dc469b03f5f6fafdc (patch) | |
tree | 12c32550a87790eaa310d2c7525728ca354b910c /fortran/src/H5_f.c | |
parent | 14da68ebffbb5750a86a180863e7c18ae5c8d461 (diff) | |
download | hdf5-32ef796e470da3e4de364d8dc469b03f5f6fafdc.zip hdf5-32ef796e470da3e4de364d8dc469b03f5f6fafdc.tar.gz hdf5-32ef796e470da3e4de364d8dc469b03f5f6fafdc.tar.bz2 |
HDFFV-11306 Fixed (#1657)
* HDFFV-11306,
* Fixed it so both h5open_f and h5close_f can be called multiple times.
* Fixed an issue with open objects remaining after h5close_f was called.
* Added additional tests.
* comments clean-up
Diffstat (limited to 'fortran/src/H5_f.c')
-rw-r--r-- | fortran/src/H5_f.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 0277e5c..468debe 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -65,12 +65,6 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes) * Find the HDF5 type of the Fortran Integer KIND. */ - /* Initialized INTEGER KIND types to default to native integer */ - for (i = 0; i < 5; i++) { - if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) - return ret_value; - } - for (i = 0; i < H5_FORTRAN_NUM_INTEGER_KINDS; i++) { if (IntKinds_SizeOf[i] == sizeof(char)) { if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) @@ -96,6 +90,12 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes) } /*end else */ } + /* Initialized missing INTEGER KIND types to default to native integer */ + for (i = H5_FORTRAN_NUM_INTEGER_KINDS; i < 5; i++) { + if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) + return ret_value; + } + if (sizeof(int_f) == sizeof(int)) { if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value; |