summaryrefslogtreecommitdiffstats
path: root/src/H5Ddeprec.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-06 22:44:35 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-06 22:44:35 (GMT)
commit843ccf86dd147e245bab269520741b0f103b4d6b (patch)
tree0af8a96abba787fa04f1d3d92af2400066fa133d /src/H5Ddeprec.c
parent7a070012c08c4ef16a6effc01e03c2ca7cd8fa00 (diff)
downloadhdf5-843ccf86dd147e245bab269520741b0f103b4d6b.zip
hdf5-843ccf86dd147e245bab269520741b0f103b4d6b.tar.gz
hdf5-843ccf86dd147e245bab269520741b0f103b4d6b.tar.bz2
[svn-r22523] - rework how IDs for VOL objects are created
- change how the vlose routine is registered with VOL IDs - some bug fixes
Diffstat (limited to 'src/H5Ddeprec.c')
-rw-r--r--src/H5Ddeprec.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index a0df4cc..c84d440 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -186,14 +186,9 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
H5P_DATASET_ACCESS_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
- /* Get an atom for the file */
- if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
+ /* Get an atom for the dataset */
+ if((ret_value = H5I_register2(H5I_DATASET, dset, vol_plugin, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle")
-
- /* attach VOL information to the ID */
- if (H5I_register_aux(ret_value, vol_plugin, (H5I_free2_t)H5D_close_dataset) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
-
vol_plugin->nrefs ++;
done:
@@ -253,14 +248,9 @@ H5Dopen1(hid_t loc_id, const char *name)
if(NULL == (dset = H5VL_dataset_open(obj, loc_params, vol_plugin, name, dapl_id, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
- /* Get an atom for the file */
- if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
+ /* Get an atom for the dataset */
+ if((ret_value = H5I_register2(H5I_DATASET, dset, vol_plugin, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle")
-
- /* attach VOL information to the ID */
- if (H5I_register_aux(ret_value, vol_plugin, (H5I_free2_t)H5D_close_dataset) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
-
vol_plugin->nrefs ++;
done: