diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-12 01:29:45 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-12 01:29:45 (GMT) |
commit | ca0b287d21f4d73bc7d197ee7f6e92ca2631e373 (patch) | |
tree | 22153cbcb36f9313fcbe536b47445db2721476cb /fortran/src | |
parent | 637fa77ea7e720eb7b5a932ceeb0d05beeefb978 (diff) | |
download | hdf5-ca0b287d21f4d73bc7d197ee7f6e92ca2631e373.zip hdf5-ca0b287d21f4d73bc7d197ee7f6e92ca2631e373.tar.gz hdf5-ca0b287d21f4d73bc7d197ee7f6e92ca2631e373.tar.bz2 |
[svn-r14204] Description:
Move H5Pinsert() out of old "compat v1.6" section and into API
versioning, switching internal usage to H5Pinsert2().
Add regression test for H5Pinsert1()
Clean up some other minor warnings.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5Pf.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 54f99d0..3f8bebf 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -2365,7 +2365,7 @@ nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd v /*---------------------------------------------------------------------------- * Name: h5pinsert_c - * Purpose: Call H5Pinsert to iinsert a temporary property + * Purpose: Call H5Pinsert2 to iinsert a temporary property * Inputs: plist - property list class identifier * name - name of the new property * name_len - length of the "name" buffer @@ -2379,24 +2379,22 @@ nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd v int_f nh5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void UNUSED *value) { + char* c_name = NULL; int_f ret_value = -1; - hid_t c_plist; - char* c_name; - size_t c_size; - c_name = (char *)HD5f2cstring(name, (size_t)*name_len); - if (c_name == NULL) goto DONE; - c_size = (size_t)*size; - c_plist = (hid_t)*plist; + if(NULL == ( c_name = (char *)HD5f2cstring(name, (size_t)*name_len))) + goto DONE; /* - * Call H5Pinsert function. + * Call H5Pinsert2 function. */ - if( H5Pinsert(c_plist, c_name, c_size, value, NULL,NULL,NULL,NULL,NULL,NULL) <0) goto DONE; + if(H5Pinsert2((hid_t)*plist, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + goto DONE; ret_value = 0; DONE: - if(c_name != NULL) HDfree(c_name); + if(c_name) + HDfree(c_name); return ret_value; } |