diff options
Diffstat (limited to 'src/H5Tcset.c')
-rw-r--r-- | src/H5Tcset.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/H5Tcset.c b/src/H5Tcset.c index acc1064..1a9e39d 100644 --- a/src/H5Tcset.c +++ b/src/H5Tcset.c @@ -86,16 +86,16 @@ H5Tget_cset(hid_t type_id) /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_CSET_ERROR, "not a data type") - while (dt->parent && !H5T_IS_STRING(dt)) - dt = dt->parent; /*defer to parent*/ - if (!H5T_IS_STRING(dt)) + while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) + dt = dt->shared->parent; /*defer to parent*/ + if (!H5T_IS_STRING(dt->shared)) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_CSET_ERROR, "operation not defined for data type class") /* result */ - if(H5T_IS_FIXED_STRING(dt)) - ret_value = dt->u.atomic.u.s.cset; + if(H5T_IS_FIXED_STRING(dt->shared)) + ret_value = dt->shared->u.atomic.u.s.cset; else - ret_value = dt->u.vlen.cset; + ret_value = dt->shared->u.vlen.cset; done: FUNC_LEAVE_API(ret_value) @@ -132,20 +132,20 @@ H5Tset_cset(hid_t type_id, H5T_cset_t cset) /* 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 (cset < 0 || cset >= H5T_NCSET) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal character set type") - while (dt->parent && !H5T_IS_STRING(dt)) - dt = dt->parent; /*defer to parent*/ - if (!H5T_IS_STRING(dt)) + while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) + dt = dt->shared->parent; /*defer to parent*/ + if (!H5T_IS_STRING(dt->shared)) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for data type class") /* Commit */ - if(H5T_IS_FIXED_STRING(dt)) - dt->u.atomic.u.s.cset = cset; + if(H5T_IS_FIXED_STRING(dt->shared)) + dt->shared->u.atomic.u.s.cset = cset; else - dt->u.vlen.cset = cset; + dt->shared->u.vlen.cset = cset; done: FUNC_LEAVE_API(ret_value) |