summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2011-10-20 18:11:40 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2011-10-20 18:11:40 (GMT)
commiteefa5cf26f800a7d63a706f6465015645b7a8eb1 (patch)
tree772b37465714417eb5595cc8953e91cf89503e56 /fortran
parent1c320f00256922f8479a8336ac8b6c5c9f3c2293 (diff)
downloadhdf5-eefa5cf26f800a7d63a706f6465015645b7a8eb1.zip
hdf5-eefa5cf26f800a7d63a706f6465015645b7a8eb1.tar.gz
hdf5-eefa5cf26f800a7d63a706f6465015645b7a8eb1.tar.bz2
[svn-r21619] Description:
Changed the API to pass type(h5o_info_t) instead of a C pointer to the derived type. Tested: jam (gfortran and pgi)
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Off_F03.f9027
1 files changed, 14 insertions, 13 deletions
diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90
index b2cbc70..8eb7a4b 100644
--- a/fortran/src/H5Off_F03.f90
+++ b/fortran/src/H5Off_F03.f90
@@ -170,7 +170,6 @@ CONTAINS
END SUBROUTINE h5ovisit_f
-!
!****s* H5O (F03)/h5oget_info_by_name_f_F03
!
! NAME
@@ -180,15 +179,16 @@ CONTAINS
! Retrieves the metadata for an object, identifying the object by location and relative name.
!
! Inputs:
-! loc_id - File or group identifier specifying location of group in which object
-! is located.
-! name - Name of group, relative to loc_id
+! loc_id - File or group identifier specifying location of group
+! in which object is located.
+! name - Name of group, relative to loc_id
+!
+! Outputs:
+! object_info - Buffer in which to return object information
+! hdferr - Returns 0 if successful and -1 if fails
!
-! Outputs: NOTE: In C it is defined as a structure: H5O_info_t
-! **** NEED TO MAKE THIS DERIVED DATATYPE ****
-! hdferr - Returns 0 if successful and -1 if fails
! Optional parameters:
-! lapl_id - Link access property list
+! lapl_id - Link access property list
!
! AUTHOR
! M. Scot Breitenfeld
@@ -199,15 +199,16 @@ CONTAINS
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
- INTEGER(HID_T) , INTENT(IN) :: loc_id
- CHARACTER(LEN=*), INTENT(IN) :: name
- TYPE(C_PTR) :: object_info
+ INTEGER(HID_T) , INTENT(IN) :: loc_id
+ CHARACTER(LEN=*), INTENT(IN) :: name
+ TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
!*****
INTEGER :: corder_valid
INTEGER(SIZE_T) :: namelen
INTEGER(HID_T) :: lapl_id_default
+ TYPE(C_PTR) :: ptr
INTERFACE
INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, &
@@ -231,9 +232,9 @@ CONTAINS
lapl_id_default = H5P_DEFAULT_F
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
- hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, &
- object_info)
+ ptr = C_LOC(object_info)
+ hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr)
END SUBROUTINE H5Oget_info_by_name_f