Skip to content

Commit

Permalink
Fix Fortran test
Browse files Browse the repository at this point in the history
The C API H5Rget_attr_name incorrectly added 1 to the length of the
referenced object's attribute name, so the Fortran API h5rget_attr_name_f
removed 1 from the returned value to accommodate the incorrectness.
This PR fixes H5Rget_attr_name so this workaround in h5rget_attr_name_f
is no longer needed.
  • Loading branch information
bmribler committed Jul 17, 2024
1 parent 49404be commit a596716
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fortran/src/H5Rff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,6 @@ END FUNCTION H5Rget_attr_name
c_name(1:1)(1:1) = C_NULL_CHAR
name_len = H5Rget_attr_name(ref_ptr, c_name, 1_SIZE_T)
IF(name_len.LT.0_SIZE_T) hdferr = H5I_INVALID_HID_F
! Don't include the NULL term in the size
name_len = name_len - 1
ELSE
l = INT(LEN(name)+1,SIZE_T)
IF(H5Rget_attr_name(ref_ptr, c_name, l) .LT. 0_SIZE_T)THEN
Expand Down

0 comments on commit a596716

Please sign in to comment.