summaryrefslogtreecommitdiffstats
path: root/src/H5EAhdr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-01-27 22:43:58 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-01-27 22:43:58 (GMT)
commit05f1e4f778a3535135339293953d89cee8874854 (patch)
treecb2617bd90fdbdd010c4e143abdcbb112fae9012 /src/H5EAhdr.c
parentc7407a8ccbe548c765da063204114107b5bb566a (diff)
downloadhdf5-05f1e4f778a3535135339293953d89cee8874854.zip
hdf5-05f1e4f778a3535135339293953d89cee8874854.tar.gz
hdf5-05f1e4f778a3535135339293953d89cee8874854.tar.bz2
[svn-r16366] Description:
Add context pointer for extensible array client callbacks. Tested on: Mac OS X/32 (amazon) FreeBSD/32 (duty) (too minor to require full h5committest)
Diffstat (limited to 'src/H5EAhdr.c')
-rw-r--r--src/H5EAhdr.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index afbd6bd..349dceb 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -140,6 +140,10 @@ H5EA__hdr_alloc(H5F_t *f, const H5EA_class_t *cls))
/* Set the class of the array */
hdr->cparam.cls = cls;
+ /* Create the callback context */
+ if(NULL == (hdr->cb_ctx = (*cls->crt_context)(f)))
+ H5E_THROW(H5E_CANTCREATE, "unable to create extensible array client callback context")
+
/* Set the return value */
ret_value = hdr;
@@ -686,6 +690,11 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr))
HDassert(hdr);
HDassert(hdr->rc == 0);
+ /* Destroy the callback context */
+ if((*hdr->cparam.cls->dst_context)(hdr->cb_ctx) < 0)
+ H5E_THROW(H5E_CANTRELEASE, "unable to destroy extensible array client callback context")
+ hdr->cb_ctx = NULL;
+
/* Check for data block element buffer factory info to free */
if(hdr->elmt_fac.fac) {
unsigned u; /* Local index variable */
@@ -712,7 +721,7 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr))
hdr->sblk_info = (H5EA_sblk_info_t *)H5FL_SEQ_FREE(H5EA_sblk_info_t, hdr->sblk_info);
/* Free the shared info itself */
- (void)H5FL_FREE(H5EA_hdr_t, hdr);
+ hdr = H5FL_FREE(H5EA_hdr_t, hdr);
CATCH