summaryrefslogtreecommitdiffstats
path: root/src/H5Ofill.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-03-15 21:54:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-03-15 21:54:30 (GMT)
commit4a17aff4085ad6ee265b95730aca3f493056dec8 (patch)
tree8bfb665c6d95a2e3520fa1bb0ff54d95aff3923f /src/H5Ofill.c
parent853ae26333592faf69cd8c454ef92ffea8549df5 (diff)
downloadhdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.zip
hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.gz
hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.bz2
Add API context interface and use it throughout the library.
Diffstat (limited to 'src/H5Ofill.c')
-rw-r--r--src/H5Ofill.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 5419762..445a655 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -32,19 +32,19 @@
#include "H5Sprivate.h" /* Dataspaces */
-static void *H5O_fill_old_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, const uint8_t *p);
+static void *H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, const uint8_t *p);
static herr_t H5O_fill_old_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static size_t H5O_fill_old_size(const H5F_t *f, const void *_mesg);
-static void *H5O_fill_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, const uint8_t *p);
+static void *H5O_fill_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, const uint8_t *p);
static herr_t H5O_fill_new_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static size_t H5O_fill_new_size(const H5F_t *f, const void *_mesg);
static void *H5O_fill_copy(const void *_mesg, void *_dest);
-static herr_t H5O_fill_reset(void *_mesg);
-static herr_t H5O_fill_free(void *_mesg);
-static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+static herr_t H5O__fill_reset(void *_mesg);
+static herr_t H5O__fill_free(void *_mesg);
+static herr_t H5O__fill_debug(H5F_t *f, const void *_mesg, FILE *stream,
+ int indent, int fwidth);
/* Set up & include shared message "interface" info */
#define H5O_SHARED_TYPE H5O_MSG_FILL
@@ -54,17 +54,17 @@ static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *s
#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
#define H5O_SHARED_SIZE H5O_fill_shared_size
#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
-#define H5O_SHARED_DELETE H5O_fill_shared_delete
+#define H5O_SHARED_DELETE H5O__fill_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O_fill_shared_link
+#define H5O_SHARED_LINK H5O__fill_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O_fill_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
#define H5O_SHARED_DEBUG H5O_fill_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O_fill_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* Set up & include shared message "interface" info */
@@ -84,13 +84,13 @@ static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *s
#undef H5O_SHARED_SIZE_REAL
#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
#undef H5O_SHARED_DELETE
-#define H5O_SHARED_DELETE H5O_fill_new_shared_delete
+#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
#undef H5O_SHARED_DELETE_REAL
#undef H5O_SHARED_LINK
-#define H5O_SHARED_LINK H5O_fill_new_shared_link
+#define H5O_SHARED_LINK H5O__fill_new_shared_link
#undef H5O_SHARED_LINK_REAL
#undef H5O_SHARED_COPY_FILE
-#define H5O_SHARED_COPY_FILE H5O_fill_new_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE
#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
@@ -99,7 +99,7 @@ static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *s
#undef H5O_SHARED_DEBUG
#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
#undef H5O_SHARED_DEBUG_REAL
-#define H5O_SHARED_DEBUG_REAL H5O_fill_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#undef H5Oshared_H
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
@@ -113,14 +113,14 @@ const H5O_msg_class_t H5O_MSG_FILL[1] = {{
H5O_fill_shared_encode, /*encode message */
H5O_fill_copy, /*copy the native value */
H5O_fill_shared_size, /*raw message size */
- H5O_fill_reset, /*free internal memory */
- H5O_fill_free, /* free method */
- H5O_fill_shared_delete, /* file delete method */
- H5O_fill_shared_link, /* link method */
+ H5O__fill_reset, /*free internal memory */
+ H5O__fill_free, /* free method */
+ H5O__fill_shared_delete, /* file delete method */
+ H5O__fill_shared_link, /* link method */
NULL, /* set share method */
NULL, /*can share method */
NULL, /* pre copy native value to file */
- H5O_fill_shared_copy_file, /* copy native value to file */
+ H5O__fill_shared_copy_file, /* copy native value to file */
H5O_fill_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
@@ -137,14 +137,14 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
H5O_fill_new_shared_encode, /*encode message */
H5O_fill_copy, /*copy the native value */
H5O_fill_new_shared_size, /*raw message size */
- H5O_fill_reset, /*free internal memory */
- H5O_fill_free, /* free method */
- H5O_fill_new_shared_delete, /* file delete method */
- H5O_fill_new_shared_link, /* link method */
+ H5O__fill_reset, /*free internal memory */
+ H5O__fill_free, /* free method */
+ H5O__fill_new_shared_delete,/* file delete method */
+ H5O__fill_new_shared_link, /* link method */
NULL, /* set share method */
NULL, /*can share method */
NULL, /* pre copy native value to file */
- H5O_fill_new_shared_copy_file, /* copy native value to file */
+ H5O__fill_new_shared_copy_file, /* copy native value to file */
H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
@@ -183,7 +183,7 @@ H5FL_BLK_EXTERN(type_conv);
*-------------------------------------------------------------------------
*/
static void *
-H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p)
{
H5O_fill_t *fill = NULL;
@@ -297,7 +297,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5O_fill_old_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O_fill_old_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p)
{
H5O_fill_t *fill = NULL; /* Decoded fill value message */
@@ -525,7 +525,7 @@ H5O_fill_copy(const void *_src, void *_dst)
H5T_path_t *tpath; /* Conversion information */
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(src->type, dst->type, NULL, NULL, H5AC_noio_dxpl_id, FALSE)))
+ if(NULL == (tpath = H5T_path_find(src->type, dst->type)))
HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to convert between src and dst data types")
/* If necessary, convert fill value datatypes (which copies VL components, etc.) */
@@ -553,7 +553,7 @@ H5O_fill_copy(const void *_src, void *_dst)
} /* end if */
/* Convert fill value */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, dst->buf, bkg_buf, H5AC_noio_dxpl_id) < 0) {
+ if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, dst->buf, bkg_buf) < 0) {
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
if(bkg_buf)
@@ -580,7 +580,7 @@ done:
if(dst->buf)
H5MM_xfree(dst->buf);
if(dst->type)
- H5T_close(dst->type);
+ (void)H5T_close_real(dst->type);
if(!_dst)
dst = H5FL_FREE(H5O_fill_t, dst);
} /* end if */
@@ -698,7 +698,7 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
if(NULL == (fill_type = H5T_copy(fill->type, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy fill value datatype")
if((fill_type_id = H5I_register(H5I_DATATYPE, fill_type, FALSE)) < 0) {
- H5T_close(fill_type);
+ (void)H5T_close_real(fill_type);
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register fill value datatype")
} /* end if */
@@ -707,7 +707,7 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create scalar dataspace")
/* Reclaim any variable length components of the fill value */
- if(H5D_vlen_reclaim(fill_type_id, fill_space, H5AC_noio_dxpl_id, fill->buf) < 0) {
+ if(H5D_vlen_reclaim(fill_type_id, fill_space, fill->buf) < 0) {
H5S_close(fill_space);
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "unable to reclaim variable-length fill value data")
} /* end if */
@@ -721,7 +721,7 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
} /* end if */
fill->size = 0;
if(fill->type) {
- H5T_close(fill->type);
+ (void)H5T_close_real(fill->type);
fill->type = NULL;
} /* end if */
@@ -734,7 +734,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_fill_reset
+ * Function: H5O__fill_reset
*
* Purpose: Resets a message to an initial state.
*
@@ -746,11 +746,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_fill_reset(void *_fill)
+H5O__fill_reset(void *_fill)
{
H5O_fill_t *fill = (H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(fill);
@@ -763,11 +763,11 @@ H5O_fill_reset(void *_fill)
fill->fill_defined = FALSE;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_fill_reset() */
+} /* end H5O__fill_reset() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_free
+ * Function: H5O__fill_free
*
* Purpose: Frees the message
*
@@ -779,20 +779,20 @@ H5O_fill_reset(void *_fill)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_fill_free(void *fill)
+H5O__fill_free(void *fill)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(fill);
fill = H5FL_FREE(H5O_fill_t, fill);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_fill_free() */
+} /* end H5O__fill_free() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_debug
+ * Function: H5O__fill_debug
*
* Purpose: Prints debugging info for the message.
*
@@ -804,13 +804,13 @@ H5O_fill_free(void *fill)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_fill, FILE *stream,
- int indent, int fwidth)
+H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
+ int indent, int fwidth)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
H5D_fill_value_t fill_status; /* Whether the fill value is defined */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f);
HDassert(fill);
@@ -890,7 +890,7 @@ H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
fprintf(stream, "<dataset type>\n");
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_fill_debug() */
+} /* end H5O__fill_debug() */
/*-------------------------------------------------------------------------
@@ -909,7 +909,7 @@ H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
*-------------------------------------------------------------------------
*/
herr_t
-H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_t dxpl_id)
+H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
{
H5T_path_t *tpath; /* Type conversion info */
void *buf = NULL, *bkg = NULL; /* Conversion buffers */
@@ -926,7 +926,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_
if(!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) {
/* Don't need datatype for fill value */
if(fill->type)
- H5T_close(fill->type);
+ (void)H5T_close_real(fill->type);
fill->type = NULL;
/* Note that the fill value info has changed */
@@ -938,7 +938,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_
/*
* Can we convert between source and destination data types?
*/
- if(NULL == (tpath = H5T_path_find(fill->type, dset_type, NULL, NULL, dxpl_id, FALSE)))
+ if(NULL == (tpath = H5T_path_find(fill->type, dset_type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
/* Don't bother doing anything if there will be no actual conversion */
@@ -965,16 +965,16 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
/* Do the conversion */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
+ if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "datatype conversion failed")
/* Update the fill message */
if(buf != fill->buf) {
- H5T_vlen_reclaim_elmt(fill->buf, fill->type, dxpl_id);
+ H5T_vlen_reclaim_elmt(fill->buf, fill->type);
H5MM_xfree(fill->buf);
fill->buf = buf;
} /* end if */
- H5T_close(fill->type);
+ (void)H5T_close_real(fill->type);
fill->type = NULL;
H5_CHECKED_ASSIGN(fill->size, ssize_t, H5T_get_size(dset_type), size_t);