summaryrefslogtreecommitdiffstats
path: root/src/H5Ostab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Ostab.c')
-rw-r--r--src/H5Ostab.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 3258964..17986c1 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -42,6 +42,7 @@ static herr_t H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_stab_copy(const void *_mesg, void *_dest);
static size_t H5O_stab_size(H5F_t *f, const void *_mesg);
static herr_t H5O_stab_free (void *_mesg);
+static herr_t H5O_stab_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg);
static herr_t H5O_stab_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
FILE * stream, int indent, int fwidth);
@@ -55,7 +56,8 @@ const H5O_class_t H5O_STAB[1] = {{
H5O_stab_copy, /*copy the native value */
H5O_stab_size, /*size of symbol table entry */
NULL, /*default reset method */
- H5O_stab_free, /* free method */
+ H5O_stab_free, /* free method */
+ H5O_stab_delete, /* file delete method */
NULL, /*get share method */
NULL, /*set share method */
H5O_stab_debug, /*debug the message */
@@ -313,6 +315,41 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5O_stab_delete
+ *
+ * Purpose: Free file space referenced by message
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, March 20, 2003
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O_stab_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg)
+{
+ const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5O_stab_delete, FAIL);
+
+ /* check args */
+ assert(f);
+ assert(stab);
+
+ /* Free the file space for the symbol table */
+ if (H5G_stab_delete(f, dxpl_id, stab->btree_addr, stab->heap_addr)<0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free symbol table");
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5O_stab_delete() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5O_stab_debug
*
* Purpose: Prints debugging info for a symbol table message.