diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-05-23 18:50:41 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-05-23 18:50:41 (GMT) |
commit | 6eb37e3d319c2e8c3d0804f73c6fb209bdc9f990 (patch) | |
tree | e5f37e1d2f6562995f92b2e9343e15e0eaafae60 /src | |
parent | 7d289e8a697aba2f537a62d3b6352e357b3bd83b (diff) | |
download | hdf5-6eb37e3d319c2e8c3d0804f73c6fb209bdc9f990.zip hdf5-6eb37e3d319c2e8c3d0804f73c6fb209bdc9f990.tar.gz hdf5-6eb37e3d319c2e8c3d0804f73c6fb209bdc9f990.tar.bz2 |
[svn-r22399] move location token out of va_list on lookup callback
Diffstat (limited to 'src')
-rw-r--r-- | src/H5A.c | 16 | ||||
-rw-r--r-- | src/H5G.c | 4 | ||||
-rw-r--r-- | src/H5O.c | 10 | ||||
-rw-r--r-- | src/H5R.c | 3 | ||||
-rw-r--r-- | src/H5Rdeprec.c | 3 | ||||
-rw-r--r-- | src/H5VL.c | 10 | ||||
-rw-r--r-- | src/H5VLnative.c | 8 | ||||
-rw-r--r-- | src/H5VLprivate.h | 2 | ||||
-rw-r--r-- | src/H5VLpublic.h | 2 |
9 files changed, 30 insertions, 28 deletions
@@ -309,7 +309,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Get correct property list */ @@ -599,7 +599,7 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the attribute through the VOL */ @@ -1676,7 +1676,7 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, #endif /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the attribute through the VOL */ @@ -1893,7 +1893,7 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, void *location = NULL; /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* get the attribute info through the VOL */ @@ -2066,7 +2066,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the object through the VOL */ @@ -2179,7 +2179,7 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the attribute through the VOL */ @@ -2246,7 +2246,7 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* get the attribute info through the VOL */ @@ -2634,7 +2634,7 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, obj_name, lapl_id) < 0) + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, obj_name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* get the attribute info through the VOL */ @@ -527,7 +527,7 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, name, lapl_id) < 0) + if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Get the group info through the VOL using the location token */ @@ -586,7 +586,7 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_IDX, H5_REQUEST_NULL, &location, group_name, + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_IDX, &location, H5_REQUEST_NULL, group_name, idx_type, order, n, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") @@ -241,7 +241,7 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, name, lapl_id) < 0) + if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the object through the VOL */ @@ -306,7 +306,7 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_IDX, H5_REQUEST_NULL, &location, group_name, + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_IDX, &location, H5_REQUEST_NULL, group_name, idx_type, order, n, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") @@ -370,7 +370,7 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr) H5TRACE2("i", "ia", loc_id, addr); /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_ADDR, H5_REQUEST_NULL, &location, addr) < 0) + if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_ADDR, &location, H5_REQUEST_NULL, addr) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the object through the VOL */ @@ -644,7 +644,7 @@ H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lap HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, H5_REQUEST_NULL, &location, name, lapl_id) < 0) + if(H5VL_object_lookup (loc_id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, H5_REQUEST_NULL, name, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Get the group info through the VOL using the location token */ @@ -703,7 +703,7 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_IDX, H5_REQUEST_NULL, &location, group_name, + if(H5VL_object_lookup(loc_id, H5VL_OBJECT_LOOKUP_BY_IDX, &location, H5_REQUEST_NULL, group_name, idx_type, order, n, lapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") @@ -527,7 +527,8 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (obj_id, H5VL_OBJECT_LOOKUP_BY_REF, H5_REQUEST_NULL, &location, ref_type, _ref) < 0) + if(H5VL_object_lookup (obj_id, H5VL_OBJECT_LOOKUP_BY_REF, &location, H5_REQUEST_NULL, + ref_type, _ref) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c index 5fb6813..e6d8d21 100644 --- a/src/H5Rdeprec.c +++ b/src/H5Rdeprec.c @@ -196,7 +196,8 @@ H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *_ref) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (obj_id, H5VL_OBJECT_LOOKUP_BY_REF, H5_REQUEST_NULL, &location, ref_type, _ref) < 0) + if(H5VL_object_lookup (obj_id, H5VL_OBJECT_LOOKUP_BY_REF, &location, H5_REQUEST_NULL, + ref_type, _ref) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the object through the VOL */ @@ -825,7 +825,7 @@ H5VL_datatype_open(hid_t id, const char *name, hid_t tapl_id, hid_t req) the location of the object */ /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (id, H5VL_OBJECT_LOOKUP_BY_NAME, req, &location, name, tapl_id) < 0) + if(H5VL_object_lookup (id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, req, name, tapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the object through the VOL */ @@ -964,7 +964,7 @@ H5VL_dataset_open(hid_t id, const char *name, hid_t dapl_id, hid_t req) the location of the object */ /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (id, H5VL_OBJECT_LOOKUP_BY_NAME, req, &location, name, dapl_id) < 0) + if(H5VL_object_lookup (id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, req, name, dapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the object through the VOL */ @@ -1509,7 +1509,7 @@ H5VL_group_open(hid_t id, const char *name, hid_t gapl_id, hid_t req) the location of the object */ /* Get the token for the Object location through the VOL */ - if(H5VL_object_lookup (id, H5VL_OBJECT_LOOKUP_BY_NAME, req, &location, name, gapl_id) < 0) + if(H5VL_object_lookup (id, H5VL_OBJECT_LOOKUP_BY_NAME, &location, req, name, gapl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") /* Open the object through the VOL */ @@ -1897,7 +1897,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5VL_object_lookup(hid_t id, H5VL_object_lookup_t lookup_type, hid_t req, ...) +H5VL_object_lookup(hid_t id, H5VL_object_lookup_t lookup_type, void **location, hid_t req, ...) { va_list arguments; /* argument list passed from the API call */ H5VL_class_t *vol_plugin; /* VOL structure attached to id */ @@ -1912,7 +1912,7 @@ H5VL_object_lookup(hid_t id, H5VL_object_lookup_t lookup_type, hid_t req, ...) HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "vol plugin has no `object lookup' method") va_start (arguments, req); - if((ret_value = (vol_plugin->object_cls.lookup)(id, lookup_type, req, arguments)) < 0) + if((ret_value = (vol_plugin->object_cls.lookup)(id, lookup_type, location, req, arguments)) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "lookup of object location failed") va_end (arguments); done: diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 3e942b1..c4fb0e8 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -108,7 +108,7 @@ static herr_t H5VL_native_link_remove(hid_t loc_id, const char *name, void *udat static hid_t H5VL_native_object_open(hid_t loc_id, void *location, hid_t lapl_id, hid_t req); static herr_t H5VL_native_object_copy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t req); -static herr_t H5VL_native_object_lookup(hid_t loc_id, H5VL_object_lookup_t lookup_type, hid_t req, va_list arguments); +static herr_t H5VL_native_object_lookup(hid_t loc_id, H5VL_object_lookup_t lookup_type, void **location, hid_t req, va_list arguments); static herr_t H5VL_native_object_free_loc(void *location, hid_t req); static herr_t H5VL_native_object_get(hid_t id, H5VL_object_get_t get_type, hid_t req, va_list arguments); static herr_t H5VL_native_object_generic(hid_t id, H5VL_object_generic_t generic_type, hid_t req, va_list arguments); @@ -2479,17 +2479,17 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5VL_native_object_lookup(hid_t loc_id, H5VL_object_lookup_t lookup_type, hid_t UNUSED req, va_list arguments) +H5VL_native_object_lookup(hid_t loc_id, H5VL_object_lookup_t lookup_type, void **loc_token, + hid_t UNUSED req, va_list arguments) { H5G_loc_t loc; H5G_loc_t *obj_loc; - H5G_loc_t **location; + H5G_loc_t **location = (H5G_loc_t **)loc_token; haddr_t obj_addr; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT - location = va_arg (arguments, H5G_loc_t **); *location = (H5G_loc_t *) H5MM_malloc (sizeof (H5G_loc_t)); if(H5G_loc(loc_id, &loc) < 0) diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h index 44a20a4..c82eca3 100644 --- a/src/H5VLprivate.h +++ b/src/H5VLprivate.h @@ -93,7 +93,7 @@ H5_DLL herr_t H5VL_object_copy(hid_t src_loc_id, const char *src_name, hid_t dst const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t req); H5_DLL herr_t H5VL_object_get(hid_t uid, H5VL_object_get_t get_type, hid_t req, ...); H5_DLL herr_t H5VL_object_generic(hid_t id, H5VL_object_generic_t generic_type, hid_t req, ...); -H5_DLL herr_t H5VL_object_lookup(hid_t uid, H5VL_object_lookup_t lookup_type, hid_t req, ...); +H5_DLL herr_t H5VL_object_lookup(hid_t uid, H5VL_object_lookup_t lookup_type, void **location, hid_t req, ...); H5_DLL herr_t H5VL_object_free_loc(hid_t loc_id, void *location, hid_t req); H5_DLL herr_t H5VL_object_close(hid_t uid, hid_t req); diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h index 4a7bd5a..27d8a49 100644 --- a/src/H5VLpublic.h +++ b/src/H5VLpublic.h @@ -189,7 +189,7 @@ typedef struct H5VL_object_class_t { hid_t (*open) (hid_t loc_id, void *obj_loc, hid_t lapl_id, hid_t req); herr_t (*copy) (hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t req); - herr_t (*lookup)(hid_t loc_id, H5VL_object_lookup_t lookup_type, hid_t req, va_list arguments); + herr_t (*lookup)(hid_t loc_id, H5VL_object_lookup_t lookup_type, void **location, hid_t req, va_list arguments); herr_t (*free_loc)(void *location, hid_t req); herr_t (*get) (hid_t loc_id, H5VL_object_get_t get_type, hid_t req, va_list arguments); herr_t (*generic)(hid_t id, H5VL_object_generic_t generic_type, hid_t req, va_list arguments); |