summaryrefslogtreecommitdiffstats
path: root/src/H5Adeprec.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/H5Adeprec.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/H5Adeprec.c')
-rw-r--r--src/H5Adeprec.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index b239142..92d80bc 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -185,13 +185,8 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create attribute")
/* Get an atom for the attribute */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize attribute handle")
-
- /* attach VOL information to the ID */
- if (H5I_register_aux(ret_value, vol_plugin, (H5I_free2_t)H5A_close_attr) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
-
+ if((ret_value = H5I_register2(H5I_ATTR, attr, vol_plugin, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle")
vol_plugin->nrefs ++;
done:
@@ -258,13 +253,8 @@ H5Aopen_name(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open attribute")
/* Get an atom for the attribute */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize attribute handle")
-
- /* attach VOL information to the ID */
- if (H5I_register_aux(ret_value, vol_plugin, (H5I_free2_t)H5A_close_attr) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
-
+ if((ret_value = H5I_register2(H5I_ATTR, attr, vol_plugin, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle")
vol_plugin->nrefs ++;
done:
@@ -333,13 +323,8 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open attribute")
/* Get an atom for the attribute */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize attribute handle")
-
- /* attach VOL information to the ID */
- if (H5I_register_aux(ret_value, vol_plugin, (H5I_free2_t)H5A_close_attr) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
-
+ if((ret_value = H5I_register2(H5I_ATTR, attr, vol_plugin, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle")
vol_plugin->nrefs ++;
done:
@@ -391,8 +376,8 @@ H5Aget_num_attrs(hid_t loc_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
/* Get the group info through the VOL using the location token */
- if(H5VL_object_get(obj, loc_params, vol_plugin, H5VL_OBJECT_GET_INFO,
- H5_REQUEST_NULL, &oinfo) < 0)
+ if(H5VL_object_get(obj, loc_params, vol_plugin, H5VL_OBJECT_GET_INFO,
+ H5_REQUEST_NULL, &oinfo) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get group info")
ret_value = oinfo.num_attrs;