diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-09 15:32:51 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-09 15:32:51 (GMT) |
commit | 140c0c9db2992989b9a0cb6b20589efdcc9c2184 (patch) | |
tree | 2ab5ed56ffc92f8fdeb335743385a907de865f49 /src | |
parent | 487d82bf58a1a8795343512c17a8b5a8428bdcd9 (diff) | |
download | hdf5-140c0c9db2992989b9a0cb6b20589efdcc9c2184.zip hdf5-140c0c9db2992989b9a0cb6b20589efdcc9c2184.tar.gz hdf5-140c0c9db2992989b9a0cb6b20589efdcc9c2184.tar.bz2 |
[svn-r13274] Description:
Relax restriction on the "location ID" for attribute operations to allow
file IDs to be used as the location ID. If a file ID is used, the attribute
operations will occur on the file's root group.
Tested on:
FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5A.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -239,7 +239,7 @@ H5Acreate(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, H5TRACE5("i", "isiii", loc_id, name, type_id, space_id, plist_id); /* check arguments */ - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") @@ -447,7 +447,7 @@ H5Aopen_name(hid_t loc_id, const char *name) H5TRACE2("i", "is", loc_id, name); /* check arguments */ - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") @@ -502,7 +502,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx) H5TRACE2("i", "iIu", loc_id, idx); /* check arguments */ - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") @@ -1296,7 +1296,7 @@ H5Aget_info(hid_t loc_id, const char *name, H5A_info_t *ainfo) FUNC_ENTER_API(H5Aget_info, FAIL) /* Check args */ - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") @@ -1347,7 +1347,7 @@ H5Aget_info_by_idx(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, FUNC_ENTER_API(H5Aget_info_by_idx, FAIL) /* Check args */ - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") @@ -1438,7 +1438,7 @@ H5Arename(hid_t loc_id, const char *old_name, const char *new_name) /* check arguments */ if(!old_name || !new_name) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "name is nil") - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, & loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") @@ -1501,7 +1501,7 @@ H5Aiterate(hid_t loc_id, unsigned *attr_num, H5A_operator_t op, void *op_data) H5TRACE4("e", "i*Iuxx", loc_id, attr_num, op, op_data); /* check arguments */ - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") @@ -1549,7 +1549,7 @@ H5Adelete(hid_t loc_id, const char *name) H5TRACE2("e", "is", loc_id, name); /* check arguments */ - if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id)) + if(H5I_ATTR == H5I_get_type(loc_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(H5G_loc(loc_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") |