From b1c6bb5b982562a872f79f58d003fae65af2a2a4 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 11 Nov 2006 01:22:41 -0500 Subject: [svn-r12893] Description: Fix error with retrieving names of object references on big-endian platforms. Tested on: AIX/32 5.? (copper) --- src/H5R.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/H5R.c b/src/H5R.c index a8e2d32..3232ba3 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -808,7 +808,6 @@ H5R_get_name(H5F_t *f, hid_t dxpl_id, hid_t id, H5R_type_t ref_type, { hid_t file_id = (-1); /* ID for file that the reference is in */ H5O_loc_t oloc; /* Object location describing object for reference */ - const uint8_t *p; /* Pointer to reference to decode */ ssize_t ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5R_get_name) @@ -823,15 +822,17 @@ H5R_get_name(H5F_t *f, hid_t dxpl_id, hid_t id, H5R_type_t ref_type, oloc.file = f; /* Get address for reference */ - p = (const uint8_t *)_ref; switch(ref_type) { case H5R_OBJECT: - H5F_addr_decode(oloc.file, &p, &oloc.addr); + oloc.addr = *(const hobj_ref_t *)_ref; break; case H5R_DATASET_REGION: { + const uint8_t *p; /* Pointer to reference to decode */ + /* Skip over the heap ID for the dataset region */ + p = (const uint8_t *)_ref; p += H5F_SIZEOF_ADDR(f); p += 4; -- cgit v0.12