diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-29 20:44:19 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-29 20:44:19 (GMT) |
commit | db3c155bf296fa06ab0df56bb7307f2ba19613e5 (patch) | |
tree | 722dbba200b5baf9b45de8187ea3af0d0f7f48ca /fortran | |
parent | a4c8e8fd5636e6059beb2031cb98af3dc1617dd3 (diff) | |
download | hdf5-db3c155bf296fa06ab0df56bb7307f2ba19613e5.zip hdf5-db3c155bf296fa06ab0df56bb7307f2ba19613e5.tar.gz hdf5-db3c155bf296fa06ab0df56bb7307f2ba19613e5.tar.bz2 |
[svn-r14126] Description:
Move H5Gunlink to deprecated symbol section, replacing internal calls
with H5Ldelete.
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
Solaris/32 5.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5Gf.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 0ca7e38..5dd00b0 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -397,28 +397,26 @@ DONE: int_f nh5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) { - int ret_value = -1; - hid_t c_loc_id; - char *c_name; - size_t c_namelen; - herr_t c_ret_value; - /* - * Convert Fortran name to C name - */ - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); - if(c_name == NULL) return ret_value; - /* - * Call H5Gunlink function - */ - c_loc_id = (hid_t)*loc_id; - c_ret_value = H5Gunlink(c_loc_id, c_name); - if(c_ret_value < 0) goto DONE; - ret_value = 0; + char *c_name = NULL; + int ret_value = -1; + + /* + * Convert Fortran name to C name + */ + if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) + goto DONE; + + /* + * Call H5Gunlink function + */ + if(H5Ldelete((hid_t)*loc_id, c_name, H5P_DEFAULT) < 0) + goto DONE; + ret_value = 0; DONE: - HDfree(c_name); - return ret_value ; + if(c_name) + HDfree(c_name); + return ret_value; } /*---------------------------------------------------------------------------- |