summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-27 16:40:08 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-27 16:40:08 (GMT)
commit59a523410bcfed4bc14be9f17d72bd9ee6fb21dd (patch)
treeaea48db0ee4a5e99cb987d2f79c2b8f08d8fc6c2
parent0fe43fbf2cd56f142ec322daca2a669fac8243ed (diff)
downloadhdf5-59a523410bcfed4bc14be9f17d72bd9ee6fb21dd.zip
hdf5-59a523410bcfed4bc14be9f17d72bd9ee6fb21dd.tar.gz
hdf5-59a523410bcfed4bc14be9f17d72bd9ee6fb21dd.tar.bz2
[svn-r23835] add a new API routine H5Tget_vol_named_type that retrieves the VOL named datatype object pointer.
-rw-r--r--src/H5Tcommit.c36
-rw-r--r--src/H5Tpublic.h1
2 files changed, 35 insertions, 2 deletions
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index bb0a2ba..dca92b9 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..7d63c5a 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 */