diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-10-06 16:35:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-10-06 16:35:18 (GMT) |
commit | 458576c82655a32b8a0cf0ab4228a480ab6fbaeb (patch) | |
tree | bc7fafb54f946129690cb18532ee41ac5f1fbca7 /src/H5Tcompound.c | |
parent | 01dbfdefb2f0396e866543f12280f4947296adac (diff) | |
download | hdf5-458576c82655a32b8a0cf0ab4228a480ab6fbaeb.zip hdf5-458576c82655a32b8a0cf0ab4228a480ab6fbaeb.tar.gz hdf5-458576c82655a32b8a0cf0ab4228a480ab6fbaeb.tar.bz2 |
[svn-r9375] Purpose:
Bug fix
Description:
Close a couple of memory leaks
Platforms tested:
FreeBSD 4.10 (sleipnir)
Solaris 2.7 (arabica) w/purify
Linux 2.4 (verbena)
too minor for h5committest
Diffstat (limited to 'src/H5Tcompound.c')
-rw-r--r-- | src/H5Tcompound.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c index cbb269c..f29342f 100644 --- a/src/H5Tcompound.c +++ b/src/H5Tcompound.c @@ -300,6 +300,40 @@ done: /*------------------------------------------------------------------------- + * Function: H5T_get_member_size + * + * Purpose: Returns the size of the specified member. + * + * Return: Success: The size in bytes of the member's datatype. + * + * Failure: 0 + * + * Programmer: Quincey Koziol + * October 4, 2004 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +size_t +H5T_get_member_size(H5T_t *dt, int membno) +{ + size_t ret_value = 0; + + FUNC_ENTER_NOAPI(H5T_get_member_size, 0); + + assert(dt); + assert(membno >=0 && membno < dt->shared->u.compnd.nmembs); + + /* Value */ + ret_value = dt->shared->u.compnd.memb[membno].type->shared->size; + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- * Function: H5Tinsert * * Purpose: Adds another member to the compound datatype PARENT_ID. The |