Skip to content

Commit

Permalink
added pass by value
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Mar 18, 2024
1 parent ce6a685 commit 61622f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fortran/test/tH5E_F03.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ INTEGER(C_INT) FUNCTION custom_print_cb(n, err_desc, op_data) BIND(C)

INTEGER(SIZE_T), PARAMETER :: MSG_SIZE = 64

INTEGER(C_INT) :: n
INTEGER(C_INT), VALUE :: n
TYPE(h5e_error_t) :: err_desc
TYPE(C_PTR) :: op_data

Expand All @@ -101,6 +101,11 @@ INTEGER(C_INT) FUNCTION custom_print_cb(n, err_desc, op_data) BIND(C)

INTEGER :: error

IF(n.NE.0_C_INT)THEN
custom_print_cb = -1
RETURN
ENDIF

CALL H5Eget_class_name_f(err_desc%cls_id, cls, error)
IF(error .LT.0)THEN
custom_print_cb = -1
Expand Down

0 comments on commit 61622f1

Please sign in to comment.