summaryrefslogtreecommitdiffstats
path: root/src/H5Opkg.h
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-02-12 18:50:21 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-02-12 18:50:21 (GMT)
commitb487c22c4266a53c916c575fa7282deac447a64e (patch)
treeb83b5608ec23a5cbd6a67bafe7eaa2b91c4e1089 /src/H5Opkg.h
parentb566fea225bcbe95aa1e3c356803a5b8288e5106 (diff)
downloadhdf5-b487c22c4266a53c916c575fa7282deac447a64e.zip
hdf5-b487c22c4266a53c916c575fa7282deac447a64e.tar.gz
hdf5-b487c22c4266a53c916c575fa7282deac447a64e.tar.bz2
[svn-r16474] Purpose: fix problems related to 'self-referential' attributes
Description: When an attribute was created with a datatype or dataspace that was shared in the same object header that the attribute was in, the attribute could not be deleted. Changes made to ensure that the attribute can be deleted both when the attribute is in the object header and when it is shared in the heap. Object header message decode routines now take an "open_oh" parameter to enable them to avoid opening the same object header twice. Tested: jam, smirom (h5committest)
Diffstat (limited to 'src/H5Opkg.h')
-rw-r--r--src/H5Opkg.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index fa69b93..4bc6d26 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -187,7 +187,7 @@
\
/* Decode the message */ \
HDassert(msg_type->decode); \
- if(NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (MSG)->flags, &ioflags, (MSG)->raw))) \
+ if(NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (OH), (MSG)->flags, &ioflags, (MSG)->raw))) \
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \
\
/* Mark the message dirty if it was changed by decoding */ \
@@ -222,7 +222,7 @@ struct H5O_msg_class_t {
const char *name; /*for debugging */
size_t native_size; /*size of native message */
unsigned share_flags; /* Message sharing settings */
- void *(*decode)(H5F_t*, hid_t, unsigned, unsigned *, const uint8_t *);
+ void *(*decode)(H5F_t*, hid_t, H5O_t *, unsigned, unsigned *, const uint8_t *);
herr_t (*encode)(H5F_t*, hbool_t, uint8_t*, const void *);
void *(*copy)(const void *, void *); /*copy native value */
size_t (*raw_size)(const H5F_t *, hbool_t, const void *);/*sizeof encoded message */
@@ -515,8 +515,8 @@ H5_DLL herr_t H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
H5O_mesg_t *mesg, hbool_t adj_link);
/* Shared object operators */
-H5_DLL void * H5O_shared_decode(H5F_t *f, hid_t dxpl_id, unsigned *ioflags,
- const uint8_t *buf, const H5O_msg_class_t *type);
+H5_DLL void * H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
+ unsigned *ioflags, const uint8_t *buf, const H5O_msg_class_t *type);
H5_DLL herr_t H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_mesg);
H5_DLL size_t H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg);
H5_DLL herr_t H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,