From c5ad11290b81c86856d6297cc1ad824af327c5a3 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Mon, 26 Aug 2013 16:12:11 -0500 Subject: [svn-r24076] Allow H5VLobject_register to create an hid_t for files and attributes. --- src/H5A.c | 5 ----- src/H5VLint.c | 14 +++++++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/H5A.c b/src/H5A.c index bf1474e..1b00155 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -250,16 +250,11 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, if(NULL == (plist = (H5P_genplist_t *)H5I_object(acpl_id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - //if((temp_id = H5T_get_named_id(type_id)) < 0) - //HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid type ID") - /* set creation properties */ if(H5P_set(plist, H5VL_ATTR_TYPE_ID, &type_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for datatype id") if(H5P_set(plist, H5VL_ATTR_SPACE_ID, &space_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for space id") - //if(H5P_set(plist, H5VL_ATTR_LOC_PARAMS, &loc_params) < 0) - //HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for location") loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(loc_id); diff --git a/src/H5VLint.c b/src/H5VLint.c index 684daeb..f5d7e24 100644 --- a/src/H5VLint.c +++ b/src/H5VLint.c @@ -376,9 +376,19 @@ H5VL_object_register(void *obj, H5I_type_t obj_type, H5VL_t *vol_plugin, hbool_t /* Get an atom for the object and attach VOL information and free function to the ID */ switch(obj_type) { + case H5I_FILE: + if((ret_value = H5I_register2(obj_type, obj, vol_plugin, app_ref)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle") + break; + + case H5I_ATTR: + if((ret_value = H5I_register2(obj_type, obj, vol_plugin, app_ref)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize attribute handle") + break; + case H5I_GROUP: if((ret_value = H5I_register2(obj_type, obj, vol_plugin, app_ref)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle") + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize group handle") break; case H5I_DATASET: @@ -393,9 +403,7 @@ H5VL_object_register(void *obj, H5I_type_t obj_type, H5VL_t *vol_plugin, hbool_t case H5I_UNINIT: case H5I_BADID: - case H5I_FILE: case H5I_DATASPACE: - case H5I_ATTR: case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: -- cgit v0.12