diff options
Diffstat (limited to 'src/H5Tpad.c')
-rw-r--r-- | src/H5Tpad.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5Tpad.c b/src/H5Tpad.c index a6b818e..a4fe620 100644 --- a/src/H5Tpad.c +++ b/src/H5Tpad.c @@ -84,16 +84,16 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/) /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") - while (dt->parent) - dt = dt->parent; /*defer to parent*/ - if (!H5T_IS_ATOMIC(dt)) + 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") /* Get values */ if (lsb) - *lsb = dt->u.atomic.lsb_pad; + *lsb = dt->shared->u.atomic.lsb_pad; if (msb) - *msb = dt->u.atomic.msb_pad; + *msb = dt->shared->u.atomic.msb_pad; done: FUNC_LEAVE_API(ret_value) @@ -128,20 +128,20 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t 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 (H5T_STATE_TRANSIENT!=dt->state) + if (H5T_STATE_TRANSIENT!=dt->shared->state) HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") if (lsb < 0 || lsb >= H5T_NPAD || msb < 0 || msb >= H5T_NPAD) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type") - if (H5T_ENUM==dt->type && dt->u.enumer.nmembs>0) + 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") - while (dt->parent) - dt = dt->parent; /*defer to parent*/ - if (!H5T_IS_ATOMIC(dt)) + 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") /* Commit */ - dt->u.atomic.lsb_pad = lsb; - dt->u.atomic.msb_pad = msb; + dt->shared->u.atomic.lsb_pad = lsb; + dt->shared->u.atomic.msb_pad = msb; done: FUNC_LEAVE_API(ret_value) |