diff options
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 32 |
1 files changed, 26 insertions, 6 deletions
@@ -2003,8 +2003,6 @@ done: * Programmer: Raymond Lu * November 4, 2002 * - * Modifications: - * *------------------------------------------------------------------------- */ htri_t @@ -2017,15 +2015,37 @@ H5Tis_variable_str(hid_t dtype_id) H5TRACE1("t", "i", dtype_id); /* Check args */ - if (NULL == (dt = H5I_object_verify(dtype_id,H5I_DATATYPE))) + if(NULL == (dt = H5I_object_verify(dtype_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); /* Set return value */ - ret_value=H5T_IS_VL_STRING(dt->shared); + if((ret_value = H5T_is_variable_str(dt)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't determine if datatype is VL-string"); done: FUNC_LEAVE_API(ret_value); -} +} /* end H5Tis_variable_str() */ + + +/*------------------------------------------------------------------------- + * Function: H5T_is_variable_str + * + * Purpose: Check whether a datatype is a variable-length string + * + * Return: TRUE (1) or FALSE (0) on success/Negative on failure + * + * Programmer: Quincey Koziol + * October 17, 2007 + * + *------------------------------------------------------------------------- + */ +htri_t +H5T_is_variable_str(const H5T_t *dt) +{ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_is_variable_str) + + FUNC_LEAVE_NOAPI(H5T_IS_VL_STRING(dt->shared)); +} /* end H5T_is_variable_str() */ /*------------------------------------------------------------------------- @@ -2191,7 +2211,7 @@ done: *------------------------------------------------------------------------- */ H5T_t * -H5T_get_super(H5T_t *dt) +H5T_get_super(const H5T_t *dt) { H5T_t *ret_value=NULL; |