diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-07-03 22:06:42 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-07-03 22:06:42 (GMT) |
commit | e4a60d86caa7a76001dd4e09af246c4c0fad19ea (patch) | |
tree | 98f4a575adade88f83e264264faa8804d14bd5a8 /src/H5Tcommit.c | |
parent | 34050a7d9c9ae16326711cfb69c575bfe75e422e (diff) | |
download | hdf5-e4a60d86caa7a76001dd4e09af246c4c0fad19ea.zip hdf5-e4a60d86caa7a76001dd4e09af246c4c0fad19ea.tar.gz hdf5-e4a60d86caa7a76001dd4e09af246c4c0fad19ea.tar.bz2 |
[svn-r22513] fix some committed datatype issues
update get_type routines to construct a VOL datatype if the type is named
Diffstat (limited to 'src/H5Tcommit.c')
-rw-r--r-- | src/H5Tcommit.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 707ef21..e2995b8 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -160,19 +160,6 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") - /* - * Check arguments. We cannot commit an immutable type because H5Tclose() - * normally fails on such types (try H5Tclose(H5T_NATIVE_INT)) but closing - * a named type should always succeed. - */ - if(H5T_STATE_NAMED == type->shared->state || H5T_STATE_OPEN == type->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is already committed") - if(H5T_STATE_IMMUTABLE == type->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is immutable") - - /* Check for a "sensible" datatype to store on disk */ - if(H5T_is_sensible(type) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datatype is not sensible") loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(loc_id); @@ -1072,3 +1059,11 @@ H5T_close_datatype(void *type, H5VL_t *vol_plugin) done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_close_datatype() */ + +herr_t +H5T_set_vol_object(H5T_t *type, void *vol_obj) +{ + FUNC_ENTER_NOAPI_NOINIT_NOERR + type->vol_obj = vol_obj; + FUNC_LEAVE_NOAPI(SUCCEED) +} |