summaryrefslogtreecommitdiffstats
path: root/src/H5SMbtree2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5SMbtree2.c')
-rw-r--r--src/H5SMbtree2.c57
1 files changed, 7 insertions, 50 deletions
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index e18e9fb..e24dbb7 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -17,8 +17,8 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#include "H5SMmodule.h" /* This source code file is part of the H5SM module */
/***********/
@@ -48,9 +48,8 @@
static void *H5SM_bt2_crt_context(void *udata);
static herr_t H5SM_bt2_dst_context(void *ctx);
static herr_t H5SM_bt2_store(void *native, const void *udata);
-static herr_t H5SM_bt2_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
-static void *H5SM_bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+static herr_t H5SM_bt2_debug(FILE *stream, int indent, int fwidth,
+ const void *record);
/*****************************/
@@ -67,9 +66,7 @@ const H5B2_class_t H5SM_INDEX[1]={{ /* B-tree class information */
H5SM_message_compare, /* Record comparison callback */
H5SM_message_encode, /* Record encoding callback */
H5SM_message_decode, /* Record decoding callback */
- H5SM_bt2_debug, /* Record debugging callback */
- H5SM_bt2_crt_dbg_context, /* Create debugging context */
- H5SM_bt2_dst_context /* Destroy debugging context */
+ H5SM_bt2_debug /* Record debugging callback */
}};
@@ -100,7 +97,7 @@ H5SM_bt2_crt_context(void *_f)
{
H5F_t *f = (H5F_t *)_f; /* User data for building callback context */
H5SM_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -195,8 +192,7 @@ H5SM_bt2_store(void *native, const void *udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_bt2_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *record, const void H5_ATTR_UNUSED *_udata)
+H5SM_bt2_debug(FILE *stream, int indent, int fwidth, const void *record)
{
const H5SM_sohm_t *sohm = (const H5SM_sohm_t *)record;
@@ -218,45 +214,6 @@ H5SM_bt2_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED
/*-------------------------------------------------------------------------
- * Function: H5SM_bt2_crt_dbg_context
- *
- * Purpose: Create context for debugging callback
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5SM_bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
-{
- H5SM_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- /* Sanity check */
- HDassert(f);
-
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
-
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_addr = H5F_SIZEOF_ADDR(f);
-
- /* Set return value */
- ret_value = ctx;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5SM_bt2_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5SM_bt2_convert_to_list_op
*
* Purpose: An H5B2_remove_t callback function to convert a SOHM