summaryrefslogtreecommitdiffstats
path: root/src/H5Oattribute.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r--src/H5Oattribute.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index ea0f073..3d3ae2c 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -337,8 +337,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_open_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned UNUSED sequence, unsigned UNUSED *oh_flags_ptr, void *_udata/*in,out*/)
+H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
+ unsigned UNUSED *oh_flags_ptr, void *_udata/*in,out*/)
{
H5O_iter_opn_t *udata = (H5O_iter_opn_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
@@ -356,6 +356,10 @@ H5O_attr_open_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
if(NULL == (udata->attr = H5A_copy(NULL, (H5A_t *)mesg->native)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy attribute")
+ /* Assign [somewhat arbitrary] creation order value, for older versions of the format */
+ if(oh->version == H5O_VERSION_1)
+ udata->attr->crt_idx = sequence;
+
/* Stop iterating */
ret_value = H5_ITER_STOP;
} /* end if */