summaryrefslogtreecommitdiffstats
path: root/src/H5Tcommit.c
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 /src/H5Tcommit.c
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.
Diffstat (limited to 'src/H5Tcommit.c')
-rw-r--r--src/H5Tcommit.c36
1 files changed, 34 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