summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-03-17 21:50:32 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-03-17 21:50:32 (GMT)
commit4494348eb229ae0661754c974695d8a293c6168b (patch)
treea5e98a61dbfc55ab9556a602ba3288ef33e2a1e4 /src/H5T.c
parent31a709a6b24f4cf80f9cd99a3e55f56e81cf3066 (diff)
downloadhdf5-4494348eb229ae0661754c974695d8a293c6168b.zip
hdf5-4494348eb229ae0661754c974695d8a293c6168b.tar.gz
hdf5-4494348eb229ae0661754c974695d8a293c6168b.tar.bz2
[svn-r323] Changes since 19980316
---------------------- ./src/H5D.c ./src/H5T.c ./src/H5Tprivate.h Fixed a bug found by Kevin Powell regarding preservation of existing data during a read or write when the source and destination data types are the same. Thanks Kevin! Fixed a couple warnings on Irix64. ./src/H5D.c ./src/H5Dprivate.h ./src/H5P.c ./src/H5Ppublic.c ./src/H5Tconv.c ./src/H5Tpublic.h ./test/cmpd_dset.c The application can now turn on/off the part of the I/O pipeline that deals with preservation of initialized data. The default is off since this will be the usual case and turning it on slows down the pipe. Use H5Pset_preserve() and H5Pget_preserve(). ./src/H5Fistore.c Added an optimization for reading/writing a single chunk of chunked storage. ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Olayout.c ./src/H5Oname.c ./src/H5Osdspace.c ./src/H5Ostab.c Fixed warnings reported by marek@iiasa.ac.at. Thanks Marek. ./src/H5Odtype.c Fixed a failing assert() wrt reading compound types (not present in hdf5-1.0.0a).
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/H5T.c b/src/H5T.c
index c3fb26c..b8b1f37 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -303,7 +303,7 @@ H5T_term_interface(void)
H5T_soft_g = H5MM_xfree (H5T_soft_g);
/* Clear noop function */
- if ((cfunc=H5T_find (NULL, NULL, &pcdata))) {
+ if ((cfunc=H5T_find (NULL, NULL, H5T_BKG_NO, &pcdata))) {
pcdata->command = H5T_CONV_FREE;
(cfunc)(FAIL, FAIL, pcdata, 0, NULL, NULL);
}
@@ -2383,7 +2383,7 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata)
/* Find it */
*pcdata = NULL;
- if (NULL == (ret_value = H5T_find(src, dst, pcdata))) {
+ if (NULL == (ret_value = H5T_find(src, dst, H5T_BKG_NO, pcdata))) {
HRETURN_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL,
"conversion function not found");
}
@@ -3019,7 +3019,10 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2)
/*-------------------------------------------------------------------------
* Function: H5T_find
*
- * Purpose: Finds a conversion function for the specified path.
+ * Purpose: Finds a conversion function for the specified path. If the
+ * source and destination types are the same and NEED_BKG is not
+ * H5T_BKG_YES then a pointer to the H5T_conv_noop() function is
+ * returned.
*
* Return: Success: A pointer to an appropriate conversion
* function. The PCDATA argument is initialized
@@ -3036,7 +3039,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2)
*-------------------------------------------------------------------------
*/
H5T_conv_t
-H5T_find(const H5T_t *src, const H5T_t *dst, H5T_cdata_t **pcdata)
+H5T_find(const H5T_t *src, const H5T_t *dst, H5T_bkg_t need_bkg,
+ H5T_cdata_t **pcdata/*out*/)
{
H5T_path_t *path = NULL;
H5T_conv_t ret_value = NULL;
@@ -3045,7 +3049,7 @@ H5T_find(const H5T_t *src, const H5T_t *dst, H5T_cdata_t **pcdata)
FUNC_ENTER(H5T_find, NULL);
/* No-op case */
- if (0 == H5T_cmp(src, dst)) {
+ if (need_bkg<H5T_BKG_YES && 0==H5T_cmp(src, dst)) {
*pcdata = &noop_cdata;
HRETURN(H5T_conv_noop);
}