diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-06-27 19:07:53 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-06-27 19:07:53 (GMT) |
commit | 48c37e86ec4b5642f8f70b55e683fd31f21a9049 (patch) | |
tree | c05f36e9a36510361e669037a717a8b4b95187ff /src | |
parent | b5f6b587130537186fa47ea1487cd8e487de31d2 (diff) | |
parent | 3885f3ebdd0b4415a7ced149b46cf895bf643a95 (diff) | |
download | hdf5-48c37e86ec4b5642f8f70b55e683fd31f21a9049.zip hdf5-48c37e86ec4b5642f8f70b55e683fd31f21a9049.tar.gz hdf5-48c37e86ec4b5642f8f70b55e683fd31f21a9049.tar.bz2 |
[svn-r23838] another pending merge from VOL branch
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Tcommit.c | 36 | ||||
-rw-r--r-- | src/H5Tpublic.h | 1 |
2 files changed, 35 insertions, 2 deletions
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 9359cce..2630070 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -915,14 +915,46 @@ H5T_update_shared(H5T_t *dt) /*------------------------------------------------------------------------- + * Function: H5Tget_named_type + * + * Purpose: returns the VOL object or the named datatype structure + * if it exists. This is the public wrapper for H5T_get_named_type. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Mohamad Chaarawi + * June 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Tget_vol_named_type(hid_t type_id, void **dt_obj) +{ + H5T_t *type; /* datatype for operation */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + + /* Check arguments */ + if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + + *dt_obj = H5T_get_named_type(type); + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Tget_named_type() */ + + +/*------------------------------------------------------------------------- * Function: H5T_get_named_type * * Purpose: returns the VOL object or the named datatype structure * if it exists * - * Return: Success: Non-negative + * Return: Success: Pointer to the VOL Datatype object * - * Failure: Negative + * Failure: NULL * * Programmer: Mohamad Chaarawi * June 2012 diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index d646ef1..c3635d3 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -611,6 +611,7 @@ H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */], const int perm[/* ndims */]); H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]); +H5_DLL herr_t H5Tget_vol_named_type(hid_t type_id, void **dt_obj); #endif /* H5_NO_DEPRECATED_SYMBOLS */ |