summaryrefslogtreecommitdiffstats
path: root/src/H5Tcommit.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-05-23 16:59:53 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-05-23 16:59:53 (GMT)
commit7d289e8a697aba2f537a62d3b6352e357b3bd83b (patch)
treef8ee2ad40254c1a19f0512cca1eabdb06801c17c /src/H5Tcommit.c
parent1440f1cd87522330ed5bff30d546cacc05adf18e (diff)
downloadhdf5-7d289e8a697aba2f537a62d3b6352e357b3bd83b.zip
hdf5-7d289e8a697aba2f537a62d3b6352e357b3bd83b.tar.gz
hdf5-7d289e8a697aba2f537a62d3b6352e357b3bd83b.tar.bz2
[svn-r22395] remove the high level ID implementation that wraps the actual ID, and
store the VOL plugin in an auxilary structure in the ID pointer.
Diffstat (limited to 'src/H5Tcommit.c')
-rw-r--r--src/H5Tcommit.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 9ad67b9..cd4701c 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -154,7 +154,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
/* commite the datatype through the VOL */
if((ret_value = H5VL_datatype_commit(loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, H5_REQUEST_NULL)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open object")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcommit2() */
@@ -271,12 +271,6 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iiii", loc_id, type_id, tcpl_id, tapl_id);
- /* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
-
/* Get correct property list */
if(H5P_DEFAULT == tcpl_id)
tcpl_id = H5P_DATATYPE_CREATE_DEFAULT;
@@ -291,22 +285,10 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
if(TRUE != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list")
- /* Commit the type */
- if(H5T__commit(loc.oloc->file, type, tcpl_id, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
-
- /* Release the datatype's object header */
- {
- H5O_loc_t *oloc; /* Object location for datatype */
-
- /* Get the new committed datatype's object location */
- if(NULL == (oloc = H5T_oloc(type)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get object location of committed datatype")
-
- /* Decrement refcount on committed datatype's object header in memory */
- if(H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
- } /* end if */
+ /* commite the datatype through the VOL */
+ if((ret_value = H5VL_datatype_commit(loc_id, NULL, type_id, 0, tcpl_id, tapl_id,
+ H5_REQUEST_NULL)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
FUNC_LEAVE_API(ret_value)