diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-13 18:26:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-13 18:26:12 (GMT) |
commit | 27a1a10fbb6101a071ddb4f5f29e3bcaeb9ef8d0 (patch) | |
tree | dc5e01059a3f849f448403a23a62a55ff2bc45f7 /fortran/src/H5Gf.c | |
parent | 095762a736c3125c0190409b7c3ca01c42605ad7 (diff) | |
download | hdf5-27a1a10fbb6101a071ddb4f5f29e3bcaeb9ef8d0.zip hdf5-27a1a10fbb6101a071ddb4f5f29e3bcaeb9ef8d0.tar.gz hdf5-27a1a10fbb6101a071ddb4f5f29e3bcaeb9ef8d0.tar.bz2 |
[svn-r14146] Description:
Move H5Gget_objtype_by_idx() to deprecated symbols section, replacing
with H5Oget_info_by_idx()
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
AIX/32 5.3 (copper)
Solaris/32 2.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'fortran/src/H5Gf.c')
-rw-r--r-- | fortran/src/H5Gf.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 120bb99..fc5cfd8 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -141,11 +141,11 @@ int_f nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type) { + H5O_info_t oinfo; hid_t c_loc_id = (hid_t)*loc_id; char *c_name = NULL; size_t c_obj_namelen; char *c_obj_name = NULL; - int type; hsize_t c_idx = *idx; hid_t gid = (-1); /* Temporary group ID */ int ret_value = -1; @@ -160,10 +160,9 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, * Allocate buffer to hold name of the object */ c_obj_namelen = *obj_namelen; - if(c_obj_namelen) { + if(c_obj_namelen) if(NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1))) goto DONE; - } /* end if */ /* Get a temporary group ID for the group to query */ if((gid = H5Gopen2(c_loc_id, c_name, H5P_DEFAULT)) < 0) @@ -172,10 +171,13 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, /* Query the object's information */ if(H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen, H5P_DEFAULT) < 0) goto DONE; - if((type = H5Gget_objtype_by_idx(gid, c_idx)) == H5G_UNKNOWN) + if(H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5P_DEFAULT) < 0) goto DONE; - *obj_type = type; +/* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't + * work on non-hard links - QAK + */ + *obj_type = oinfo.type; /* * Convert C name to FORTRAN and place it in the given buffer |