diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-03-07 14:21:12 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-03-07 14:21:12 (GMT) |
commit | a318d2846c5e6f5cef635c8aa1e54d004aa33ff7 (patch) | |
tree | 13e44b533da59e542effa39603c831c73b359a85 /src/H5Ftest.c | |
parent | d7147ff0eca5df777e2d9371aca7d1d98cbe45b4 (diff) | |
download | hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.zip hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.tar.gz hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.tar.bz2 |
[svn-r22032] - move all HDF5 library access for H5F routines to the native layer, higher layer only handle ids
- create a high level user id to return to users to hold vol id and object id
- all H5 callbacks implemented except for get_object_count/ids
- some bug fixes, test suite fails for now pending update to user ids of other objects
Diffstat (limited to 'src/H5Ftest.c')
-rw-r--r-- | src/H5Ftest.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/src/H5Ftest.c b/src/H5Ftest.c index e2ee606..b9a651b 100644 --- a/src/H5Ftest.c +++ b/src/H5Ftest.c @@ -96,14 +96,25 @@ *------------------------------------------------------------------------- */ herr_t -H5F_get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, +H5F_get_sohm_mesg_count_test(hid_t uid, unsigned type_id, size_t *mesg_count) { H5F_t *file; /* File info */ + H5I_t *uid_info; + hid_t file_id; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5F_get_sohm_mesg_count_test) + if (H5I_UID == H5I_get_type(uid)) { + if(NULL == (uid_info = (H5I_t *)H5I_object(uid))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid user identifier") + file_id = uid_info->obj_id; + } + else { + file_id = uid; + } + /* Check arguments */ if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") @@ -134,13 +145,24 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_check_cached_stab_test(hid_t file_id) +H5F_check_cached_stab_test(hid_t uid) { H5F_t *file; /* File info */ + H5I_t *uid_info; + hid_t file_id; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5F_check_cached_stab_test) + if (H5I_UID == H5I_get_type(uid)) { + if(NULL == (uid_info = (H5I_t *)H5I_object(uid))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid user identifier") + file_id = uid_info->obj_id; + } + else { + file_id = uid; + } + /* Check arguments */ if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") @@ -168,13 +190,24 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr) +H5F_get_maxaddr_test(hid_t uid, haddr_t *maxaddr) { H5F_t *file; /* File info */ + H5I_t *uid_info; + hid_t file_id; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5F_get_maxaddr_test) + if (H5I_UID == H5I_get_type(uid)) { + if(NULL == (uid_info = (H5I_t *)H5I_object(uid))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid user identifier") + file_id = uid_info->obj_id; + } + else { + file_id = uid; + } + /* Check arguments */ if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") |