diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-08-03 23:44:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-08-03 23:44:17 (GMT) |
commit | f2bc1b43def9b829c722fc7b89b8dd7783e14805 (patch) | |
tree | ff1ad35dc291ca4908216e069325d6fcec1c95a3 /src/H5P.c | |
parent | 28943c415b7e6ad11a412e7a88d500622886bffe (diff) | |
download | hdf5-f2bc1b43def9b829c722fc7b89b8dd7783e14805.zip hdf5-f2bc1b43def9b829c722fc7b89b8dd7783e14805.tar.gz hdf5-f2bc1b43def9b829c722fc7b89b8dd7783e14805.tar.bz2 |
[svn-r22627] Description:
Merge some of the changes on the plist_encode_decode branch back to the
trunk.
Tested on:
Mac OSX/64 10.7.4 (amazon) w/debug
(Too minor to require h5committest)
Diffstat (limited to 'src/H5P.c')
-rw-r--r-- | src/H5P.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -118,7 +118,7 @@ H5P_init_pub_interface(void) hid_t H5Pcopy(hid_t id) { - void *obj; /* Property object to copy */ + void *obj; /* Property object to copy */ hid_t ret_value=FALSE; /* return value */ FUNC_ENTER_API(FAIL) @@ -224,7 +224,7 @@ H5Pcreate_class(hid_t parent, const char *name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't retrieve parent class") /* Create the new property list class */ - if(NULL == (pclass = H5P_create_class(par_class, name, FALSE, cls_create, create_data, cls_copy, copy_data, cls_close, close_data))) + if(NULL == (pclass = H5P_create_class(par_class, name, H5P_TYPE_USER, cls_create, create_data, cls_copy, copy_data, cls_close, close_data))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list class") /* Get an atom for the class */ @@ -1147,6 +1147,7 @@ H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data) { H5P_iter_ud_t udata; /* User data for internal iterator callback */ int fake_idx = 0; /* Index when user doesn't provide one */ + void *obj; /* Property object to copy */ int ret_value; /* return value */ FUNC_ENTER_API(FAIL) @@ -1155,6 +1156,8 @@ H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data) /* Check arguments. */ if(H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object"); + if(NULL == (obj = H5I_object(id))) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist"); if(iter_func == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration callback"); @@ -1165,13 +1168,13 @@ H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data) if(H5I_GENPROP_LST == H5I_get_type(id)) { /* Iterate over a property list */ - if((ret_value = H5P_iterate_plist(id, (idx ? idx : &fake_idx), H5P__iterate_cb, &udata)) < 0) + if((ret_value = H5P_iterate_plist((H5P_genplist_t *)obj, TRUE, (idx ? idx : &fake_idx), H5P__iterate_cb, &udata)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list"); } /* end if */ else if(H5I_GENPROP_CLS == H5I_get_type(id)) { /* Iterate over a property class */ - if((ret_value = H5P_iterate_pclass(id, (idx ? idx : &fake_idx), H5P__iterate_cb, &udata)) < 0) + if((ret_value = H5P_iterate_pclass((H5P_genclass_t *)obj, (idx ? idx : &fake_idx), H5P__iterate_cb, &udata)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over class"); } /* end if */ else |