summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2008-09-22 23:41:31 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2008-09-22 23:41:31 (GMT)
commit5bbc0eedffa32de995e993a19d345f491fc1695c (patch)
treed733f4321b20a1842da72f30e7b2b2ab18fcc1f5 /src/H5T.c
parentfe6cf16d94aeface4e429660142b243f471f8fbb (diff)
downloadhdf5-5bbc0eedffa32de995e993a19d345f491fc1695c.zip
hdf5-5bbc0eedffa32de995e993a19d345f491fc1695c.tar.gz
hdf5-5bbc0eedffa32de995e993a19d345f491fc1695c.tar.bz2
[svn-r15682] Purpose: fix bug 1298
Description: The optimized "subset" compound conversion function would improperly copy the "blank" space at the end of compound types. Modified H5T_conv_struct_init to detect when the subset type has extra space at the end, and calculate the size of the data that should be copied into the conversion buffer for each element. Changes to the functions that implement these conversions. Tested: kagiso, linew, smirom (h5committest)
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 7fd19fa..293a5c5 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -4526,19 +4526,23 @@ H5T_path_noop(const H5T_path_t *p)
* TYPE5 E;
* };
*
- * Return: One of the values of H5T_subset_t (can't fail).
+ * Return: A pointer to the subset info struct in p, or NULL if there are
+ * no compounds. Points directly into the H5T_path_t structure.
*
* Programmer: Raymond Lu
* 8 June 2007
*
- * Modifications:
+ * Modifications: Neil Fortner
+ * 19 September 2008
+ * Changed return value to H5T_subset_info_t
+ * (to allow it to return copy_size)
*
*-------------------------------------------------------------------------
*/
-H5T_subset_t
+H5T_subset_info_t *
H5T_path_compound_subset(const H5T_path_t *p)
{
- H5T_subset_t ret_value = FALSE;
+ H5T_subset_info_t *ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_path_compound_subset);