diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-06-08 19:19:11 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-06-08 19:19:11 (GMT) |
commit | c52d04320b452e9132fa656c3bf52d6b5a89d353 (patch) | |
tree | ef38215155d2a302a8fe80360e476ab3b1543e8a /fortran/src/H5Fff.F90 | |
parent | e87be2e9e770fbe6f54f11551cabff60273f1461 (diff) | |
download | hdf5-c52d04320b452e9132fa656c3bf52d6b5a89d353.zip hdf5-c52d04320b452e9132fa656c3bf52d6b5a89d353.tar.gz hdf5-c52d04320b452e9132fa656c3bf52d6b5a89d353.tar.bz2 |
HDFFV-10405: Using h5fget_obj_count_f with a file id of H5F_OBJ_ALL_F does not work properly
h5fget_obj_count_f with H5F_OBJ_ALL_F counted objects created in h5open_f, which should not be included in the count. The function now returns the correct number of objects (i.e., objects created in h5open are not included in the total).
Diffstat (limited to 'fortran/src/H5Fff.F90')
-rw-r--r-- | fortran/src/H5Fff.F90 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index a3bef37..45d9f38 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -42,6 +42,9 @@ MODULE H5F USE H5GLOBAL IMPLICIT NONE + ! Number of objects opened in H5open_f + INTEGER(SIZE_T) :: H5OPEN_NUM_OPEN_OBJ + CONTAINS !****s* H5F/h5fcreate_f ! @@ -616,9 +619,14 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: obj_count END FUNCTION h5fget_obj_count_c END INTERFACE - + hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) + ! Don't include objects created by H5open in the H5F_OBJ_ALL_F count + IF(file_id.EQ.INT(H5F_OBJ_ALL_F,HID_T))THEN + obj_count = obj_count - H5OPEN_NUM_OPEN_OBJ + ENDIF + END SUBROUTINE h5fget_obj_count_f !****s* H5F/h5fget_obj_ids_f |