summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-04 07:37:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-04 07:37:15 (GMT)
commit0a8bba91530eb333e7d3f17e18aac12db44eda63 (patch)
tree9b6cf88bc5113878ddeca5facadc1c3347ba0654 /src/H5Ocache.c
parentf555ac654b71f0bcaab99775f8c2fe1dac26bfab (diff)
downloadhdf5-0a8bba91530eb333e7d3f17e18aac12db44eda63.zip
hdf5-0a8bba91530eb333e7d3f17e18aac12db44eda63.tar.gz
hdf5-0a8bba91530eb333e7d3f17e18aac12db44eda63.tar.bz2
[svn-r13232] Description:
Remove the "scaffolding" for shared message method invocation and simplify the way shared messages are dealt with in general. Tested on: FreeBSD/32 6.2 (duty) Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 02c8975..64f23d5 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -156,10 +156,6 @@ H5O_flush_msgs(H5F_t *f, H5O_t *oh)
/* Encode the message itself */
if(curr_msg->native) {
- herr_t (*encode)(H5F_t*, uint8_t*, const void*);
-
- HDassert(curr_msg->type->encode);
-
/*
* Encode the message. If the message is shared then we
* encode a Shared Object message instead of the object
@@ -169,21 +165,18 @@ H5O_flush_msgs(H5F_t *f, H5O_t *oh)
HDassert(curr_msg->raw_size == H5O_ALIGN_OH(oh, curr_msg->raw_size));
HDassert(curr_msg->raw + curr_msg->raw_size <=
oh->chunk[curr_msg->chunkno].image + (oh->chunk[curr_msg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
- if((curr_msg->flags & H5O_MSG_FLAG_SHARED) && !H5O_NEW_SHARED(curr_msg->type))
- encode = H5O_MSG_SHARED->encode;
- else
- encode = curr_msg->type->encode;
#ifndef NDEBUG
/* Sanity check that the message won't overwrite past it's allocated space */
-if(!(curr_msg->flags & H5O_MSG_FLAG_SHARED) && !H5O_NEW_SHARED(curr_msg->type)) {
+{
size_t msg_size;
- msg_size = curr_msg->type->raw_size(f, curr_msg->native);
+ msg_size = curr_msg->type->raw_size(f, FALSE, curr_msg->native);
msg_size = H5O_ALIGN_OH(oh, msg_size);
HDassert(msg_size <= curr_msg->raw_size);
-} /* end if */
+}
#endif /* NDEBUG */
- if((encode)(f, curr_msg->raw, curr_msg->native) < 0)
+ HDassert(curr_msg->type->encode);
+ if((curr_msg->type->encode)(f, FALSE, curr_msg->raw, curr_msg->native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message")
} /* end if */