summaryrefslogtreecommitdiffstats
path: root/src/H5Oattribute.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-19 14:54:46 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-19 14:54:46 (GMT)
commit46598f35cafc38ff166783e57d5622f4a1a3153e (patch)
treec546aa50b62b9e0dff539b8a95c364b64300d4ea /src/H5Oattribute.c
parentb6bd503a59621bf51e1eec9d40547a7c8b1858d8 (diff)
downloadhdf5-46598f35cafc38ff166783e57d5622f4a1a3153e.zip
hdf5-46598f35cafc38ff166783e57d5622f4a1a3153e.tar.gz
hdf5-46598f35cafc38ff166783e57d5622f4a1a3153e.tar.bz2
[svn-r13155] Description:
Add "set_crt_index" and "get_crt_index" methods for the object header message class. Unify fractal heap definitions for shared messages and attributes, under "object header" fractal heap definitions. Initial code for adding creation order index to object header messages. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r--src/H5Oattribute.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 6cc3c02..defc7ba 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -311,6 +311,16 @@ HDfprintf(stderr, "%s: converting attributes to dense storage\n", FUNC);
/* Increment attribute count */
oh->nattrs++;
+ /* Check if the object is tracking creation order on attributes */
+ if(oh->flags & H5P_CRT_ORDER_TRACKED) {
+ /* Check for attribute creation order index on the object wrapping around */
+ if(oh->max_attr_crt_idx == H5O_MAX_CRT_ORDER_IDX)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINC, FAIL, "Attribute creation index can't be incremented")
+
+ /* Set the creation order index on the attribute & incr. creation order index */
+ attr->crt_idx = oh->max_attr_crt_idx++;
+ } /* end if */
+
/* Check for storing attribute with dense storage */
if(H5F_addr_defined(oh->attr_fheap_addr)) {
/* Insert attribute into dense storage */