mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r2729]
Purpose: Bug fix Description: Attribute test failed on O2K. h5aget_name_f function could not return correct attribute name. Solution: size function parameter had wrong datatype in F90 subroutine. Fixed it to be of INTEGER(SIZE_T) type. Platforms tested: O2K, Linux
This commit is contained in:
parent
5b442958f8
commit
ac1c247452
@ -412,7 +412,7 @@ nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
|
||||
* Allocate buffer to hold name of an attribute
|
||||
*/
|
||||
c_bufsize = *bufsize;
|
||||
c_buf = (char *)HDmalloc(c_bufsize +1);
|
||||
c_buf = (char *)HDmalloc((int)c_bufsize +1);
|
||||
if (c_buf == NULL) return ret_value;
|
||||
|
||||
/*
|
||||
@ -425,9 +425,8 @@ nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
|
||||
/*
|
||||
* Convert C name to FORTRAN and place it in the given buffer
|
||||
*/
|
||||
|
||||
HDpackFstring(c_buf, _fcdtocp(buf), c_bufsize);
|
||||
HDfree( c_buf);
|
||||
ret_value = c_size;
|
||||
HDpackFstring(c_buf, _fcdtocp(buf), (int)c_bufsize);
|
||||
HDfree(c_buf);
|
||||
ret_value = (int_f)c_size;
|
||||
return ret_value;
|
||||
}
|
||||
|
@ -979,8 +979,8 @@
|
||||
SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr)
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier
|
||||
INTEGER, INTENT(IN) :: size ! Buffer size
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: buf
|
||||
INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size
|
||||
CHARACTER(LEN=*), INTENT(INOUT) :: buf
|
||||
! Buffer to hold attribute name
|
||||
INTEGER, INTENT(OUT) :: hdferr ! Error code:
|
||||
! name length is successful,
|
||||
|
Loading…
Reference in New Issue
Block a user