summaryrefslogtreecommitdiffstats
path: root/src/H5Topaque.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Topaque.c')
-rw-r--r--src/H5Topaque.c46
1 files changed, 11 insertions, 35 deletions
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index e93bf65..9cc22c9 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -18,10 +18,7 @@
* datatypes in the H5T interface.
*/
-#define H5T_PACKAGE /*suppress error about including H5Tpkg */
-
-/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5T_init_opaque_interface
+#include "H5Tmodule.h" /* This source code file is part of the H5T module */
#include "H5private.h" /* Generic Functions */
@@ -30,27 +27,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Tpkg.h" /* Datatypes */
-
-/*--------------------------------------------------------------------------
-NAME
- H5T_init_opaque_interface -- Initialize interface-specific information
-USAGE
- herr_t H5T_init_opaque_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5T_init_iterface currently).
-
---------------------------------------------------------------------------*/
-static herr_t
-H5T_init_opaque_interface(void)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- FUNC_LEAVE_NOAPI(H5T_init())
-} /* H5T_init_opaque_interface() */
/*-------------------------------------------------------------------------
@@ -77,18 +53,18 @@ H5Tset_tag(hid_t type_id, const char *tag)
H5TRACE2("e", "i*s", type_id, tag);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_OPAQUE!=dt->shared->type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type")
if (!tag)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag")
if (HDstrlen(tag) >= H5T_OPAQUE_TAG_MAX)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long")
/* Commit */
H5MM_xfree(dt->shared->u.opaque.tag);
@@ -124,16 +100,16 @@ H5Tget_tag(hid_t type_id)
H5TRACE1("*s", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_OPAQUE != dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class")
/* result */
if (NULL==(ret_value=H5MM_strdup(dt->shared->u.opaque.tag)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_API(ret_value)