summaryrefslogtreecommitdiffstats
path: root/src/H5Tpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tpad.c')
-rw-r--r--src/H5Tpad.c44
1 files changed, 10 insertions, 34 deletions
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index 88a5e13..e636a84 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -18,10 +18,7 @@
* the datatype padding for the H5T interface.
*/
-#define H5T_PACKAGE /*suppress error about including H5Tpkg */
-
-/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5T_init_pad_interface
+#include "H5Tmodule.h" /* This source code file is part of the H5T module */
#include "H5private.h" /* Generic Functions */
@@ -29,27 +26,6 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Tpkg.h" /* Datatypes */
-
-/*--------------------------------------------------------------------------
-NAME
- H5T_init_pad_interface -- Initialize interface-specific information
-USAGE
- herr_t H5T_init_pad_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_pad_interface(void)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- FUNC_LEAVE_NOAPI(H5T_init())
-} /* H5T_init_pad_interface() */
/*-------------------------------------------------------------------------
@@ -80,12 +56,12 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/)
H5TRACE3("e", "ixx", type_id, lsb, msb);
/* 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")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_ATOMIC(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
/* Get values */
if (lsb)
@@ -124,18 +100,18 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb)
H5TRACE3("e", "iTpTp", type_id, lsb, msb);
/* 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")
if (lsb < H5T_PAD_ZERO || lsb >= H5T_NPAD || msb < H5T_PAD_ZERO || msb >= H5T_NPAD)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_ATOMIC(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
/* Commit */
dt->shared->u.atomic.lsb_pad = lsb;