diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-01-13 13:15:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-01-13 13:15:49 (GMT) |
commit | 8e391ad35a1ede1ac046f05710297aa40986642b (patch) | |
tree | 247faeeacb9925beb90b6b8c10f0d875f93ed155 /src/H5P.c | |
parent | c3a1173026916e25a5a44f1d4255b889ccbaeb2b (diff) | |
download | hdf5-8e391ad35a1ede1ac046f05710297aa40986642b.zip hdf5-8e391ad35a1ede1ac046f05710297aa40986642b.tar.gz hdf5-8e391ad35a1ede1ac046f05710297aa40986642b.tar.bz2 |
[svn-r6269] Purpose:
Code cleanup
Description:
Various code cleanups to allow the development branch to be compiled with
a C++ compiler (i.e. CC=g++ )
Platforms tested:
Tested h5committest {arabica (fortran), eirene (fortran, C++)
modi4 (parallel, fortran)}
FreeBSD 4.7 (sleipnir) C++
Diffstat (limited to 'src/H5P.c')
-rw-r--r-- | src/H5P.c | 43 |
1 files changed, 39 insertions, 4 deletions
@@ -88,7 +88,8 @@ static H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class, H5P_cls_close_func_t cls_close, void *close_data); static herr_t H5P_unregister(H5P_genclass_t *pclass, const char *name); static H5P_genprop_t *H5P_dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type); -static void H5P_free_prop(H5P_genprop_t *prop); +static herr_t H5P_free_prop(H5P_genprop_t *prop); +static void H5P_free_prop_void(void *_prop); /*-------------------------------------------------------------------------- @@ -1054,7 +1055,7 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -static void +static herr_t H5P_free_prop(H5P_genprop_t *prop) { FUNC_ENTER_NOINIT(H5P_free_prop); @@ -1071,12 +1072,46 @@ H5P_free_prop(H5P_genprop_t *prop) H5FL_FREE(H5P_genprop_t,prop); - FUNC_LEAVE_NOAPI_VOID; + FUNC_LEAVE_NOAPI(SUCCEED); } /* H5P_free_prop() */ /*-------------------------------------------------------------------------- NAME + H5P_free_prop_void + PURPOSE + Internal routine to destroy a property node (Wrapper for compatibility + with H5TB_dfree) + USAGE + void H5P_free_prop(prop) + void *prop; IN: Pointer to property to destroy + RETURNS + No return value + DESCRIPTION + Releases all the memory for a property list. Does _not_ call the + properties 'close' callback, that should already have been done. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static void +H5P_free_prop_void(void *_prop) +{ + H5P_genprop_t *prop=(H5P_genprop_t *)_prop; + + FUNC_ENTER_NOINIT(H5P_free_prop_void); + + assert(prop); + + H5P_free_prop(prop); + + FUNC_LEAVE_NOAPI_VOID; +} /* H5P_free_prop_void() */ + + +/*-------------------------------------------------------------------------- + NAME H5P_free_all_prop PURPOSE Internal routine to remove all properties from a property TBBT @@ -5138,7 +5173,7 @@ H5P_close(void *_plist) H5TB_dfree(plist->del,free,NULL); /* Free the property tree itself */ - H5TB_dfree(plist->props,H5P_free_prop,NULL); + H5TB_dfree(plist->props,H5P_free_prop_void,NULL); /* Destroy property list object */ H5FL_FREE(H5P_genplist_t,plist); |