diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-17 18:49:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-17 18:49:49 (GMT) |
commit | 4433c857661d50e748788afcbd862a12133ce756 (patch) | |
tree | 29b6d55263e14006c1471e174fc1e79f5a2680b6 /src/H5Tconv.c | |
parent | 67d22cb484f9d81cdef578deceb4a8ee5046a88b (diff) | |
download | hdf5-4433c857661d50e748788afcbd862a12133ce756.zip hdf5-4433c857661d50e748788afcbd862a12133ce756.tar.gz hdf5-4433c857661d50e748788afcbd862a12133ce756.tar.bz2 |
[svn-r5195] Purpose:
Code cleanup
Description:
Got rid of the "H5T_BKG_TEMP" setting that was used internally to the
library, since temporary background buffers are now handled by the
individual conversion routines instead of in a global background buffer.
No APIs were changed or affected by this.
Platforms tested:
FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 00cde28..bb2edd6 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1173,40 +1173,6 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, /*------------------------------------------------------------------------- - * Function: H5T_conv_need_bkg - * - * Purpose: Check whether the source or destination datatypes require a - * background buffer for the conversion. - * - * Currently, only compound datatypes require a background buffer. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Wednesday, November 29, 2000 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -static herr_t -H5T_conv_need_bkg (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) -{ - FUNC_ENTER (H5T_conv_need_bkg, FAIL); - - assert(src); - assert(dst); - assert(cdata); - - /* Compound datatypes need a buffer */ - if (H5T_detect_class(src,H5T_COMPOUND)==TRUE || H5T_detect_class(dst,H5T_COMPOUND)==TRUE) - cdata->need_bkg = H5T_BKG_YES; - - FUNC_LEAVE (SUCCEED); -} - - -/*------------------------------------------------------------------------- * Function: H5T_conv_struct_init * * Purpose: Initialize the `priv' field of `cdata' with conversion @@ -1326,7 +1292,8 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) } /* Check if we need a background buffer */ - H5T_conv_need_bkg (src, dst, cdata); + if (H5T_detect_class(src,H5T_COMPOUND)==TRUE || H5T_detect_class(dst,H5T_COMPOUND)==TRUE) + cdata->need_bkg = H5T_BKG_YES; cdata->recalc = FALSE; FUNC_LEAVE (SUCCEED); @@ -1438,7 +1405,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } assert (priv); - assert (bkg && cdata->need_bkg>=H5T_BKG_TEMP); + assert (bkg && cdata->need_bkg); if (cdata->recalc && H5T_conv_struct_init (src, dst, cdata)<0) { HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, @@ -1735,7 +1702,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, priv = (H5T_conv_struct_t *)(cdata->priv); src2dst = priv->src2dst; assert(priv); - assert(bkg && cdata->need_bkg>=H5T_BKG_TEMP); + assert(bkg && cdata->need_bkg); /* * Insure that members are sorted. |