diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-10-31 13:28:06 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-10-31 13:28:06 (GMT) |
commit | d03ae28886d062f7552334c204562a98bb7351e9 (patch) | |
tree | 84f3c2b1ded839d800783482b259da6ea0d34f48 /src/H5VLnative.c | |
parent | f921484e615c321791f729ff9c5e334656212c9a (diff) | |
download | hdf5-d03ae28886d062f7552334c204562a98bb7351e9.zip hdf5-d03ae28886d062f7552334c204562a98bb7351e9.tar.gz hdf5-d03ae28886d062f7552334c204562a98bb7351e9.tar.bz2 |
[svn-r24381] Update VOL implementation for H5Tget_create_plist to have the VOL
plugin create the ID if the datatype is committed.
This makes it consistent with other get operations in the VOL that
return an ID.
Tested: Jam
Diffstat (limited to 'src/H5VLnative.c')
-rw-r--r-- | src/H5VLnative.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 9b669f3..0343f53 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -1268,17 +1268,27 @@ H5VL_native_datatype_get(void *obj, H5VL_datatype_get_t get_type, /* H5Tget_create_plist */ case H5VL_DATATYPE_GET_TCPL: { - H5P_genplist_t *new_plist; /* New datatype creation property list */ - hid_t tcpl_id = va_arg (arguments, hid_t); + hid_t *ret_id = va_arg (arguments, hid_t *); + H5P_genplist_t *tcpl_plist = NULL; /* New datatype creation property list */ + hid_t tcpl_id; + + /* Copy the default datatype creation property list */ + if(NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_g))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default creation property list") + if((tcpl_id = H5P_copy_plist(tcpl_plist, TRUE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to copy the creation property list") + + tcpl_plist = NULL; /* Get property list object for new TCPL */ - if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(tcpl_id))) + if(NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(tcpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list"); /* Retrieve any object creation properties */ - if(H5O_get_create_plist(&dt->oloc, H5AC_ind_dxpl_id, new_plist) < 0) + if(H5O_get_create_plist(&dt->oloc, H5AC_ind_dxpl_id, tcpl_plist) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get object creation info"); + *ret_id = tcpl_id; break; } default: |