diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-12 03:00:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-12 03:00:31 (GMT) |
commit | c227f4ffa55010ea480773d9df9b68baba2b08e0 (patch) | |
tree | b2942cfaf387acd91863967c5d014ee89ee06b39 /src/H5Oainfo.c | |
parent | a64589450e5b41dc55b1c6f2e42e837fb0c72bba (diff) | |
download | hdf5-c227f4ffa55010ea480773d9df9b68baba2b08e0.zip hdf5-c227f4ffa55010ea480773d9df9b68baba2b08e0.tar.gz hdf5-c227f4ffa55010ea480773d9df9b68baba2b08e0.tar.bz2 |
[svn-r13499] Description:
Avoid storing the # of attributes in the "attribute info" message
and regenerate it when the object is opened.
Tested on:
FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src/H5Oainfo.c')
-rw-r--r-- | src/H5Oainfo.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index 655cb5e..c49786d 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -127,8 +127,8 @@ H5O_ainfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, ainfo->track_corder = (flags & H5O_AINFO_TRACK_CORDER) ? TRUE : FALSE; ainfo->index_corder = (flags & H5O_AINFO_INDEX_CORDER) ? TRUE : FALSE; - /* Number of attributes on the object */ - H5F_DECODE_LENGTH(f, p, ainfo->nattrs) + /* Set the number of attributes on the object to an invalid value, so we query it later */ + ainfo->nattrs = HSIZET_MAX; /* Max. creation order value for the object */ if(ainfo->track_corder) @@ -193,9 +193,6 @@ H5O_ainfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void flags |= ainfo->index_corder ? H5O_AINFO_INDEX_CORDER : 0; *p++ = flags; - /* Number of attributes on the object */ - H5F_ENCODE_LENGTH(f, p, ainfo->nattrs) - /* Max. creation order value for the object */ if(ainfo->track_corder) UINT16ENCODE(p, ainfo->max_crt_idx); @@ -283,7 +280,6 @@ H5O_ainfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg) /* Set return value */ ret_value = 1 /* Version */ + 1 /* Index flags */ - + H5F_SIZEOF_SIZE(f) /* Number of attributes */ + (ainfo->track_corder ? 2 : 0) /* Curr. max. creation order value */ + H5F_SIZEOF_ADDR(f) /* Address of fractal heap to store "dense" attributes */ + H5F_SIZEOF_ADDR(f) /* Address of v2 B-tree for indexing names of attributes */ |