diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2005-09-14 21:54:19 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2005-09-14 21:54:19 (GMT) |
commit | 1143f47e2d560a5283c24b42a64b9587f5613fab (patch) | |
tree | b09ca96ea8a803db310c12ebd4ee583c572fe2bf /src/H5Tconv.c | |
parent | f7c075c736d3a4615cc78308111c235a91dbdc5d (diff) | |
download | hdf5-1143f47e2d560a5283c24b42a64b9587f5613fab.zip hdf5-1143f47e2d560a5283c24b42a64b9587f5613fab.tar.gz hdf5-1143f47e2d560a5283c24b42a64b9587f5613fab.tar.bz2 |
[svn-r11415] Purpose: Internal design change.
Description: H5T_register() replaces any existing data conversion path
with a new path.
Solution: Added a parameter to H5T_register() and H5T_path_find() to
signal the library whether the new conversion path is from API function
H5Tregister() or from private function like H5T_init_interface(). If it
is from H5Tregister(), replace existing path. If it's from H5T_init_interface()
and the library is trying to register default hard conversion functions,
don't replace existing path because the path is registered by the library.
For example, the library registered H5T_conv_int_float() and is trying to
register H5T_conv_long_float(). The size of long is equal to int. There's
no need to replace the path H5T_conv_int_float().
Platforms tested: h5committest and fuss.
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 9a78adc..e5c050a 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1762,7 +1762,7 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, hid_t dxpl_id) for (i=0; i<src->shared->u.compnd.nmembs; i++) { if (src2dst[i]>=0) { H5T_path_t *tpath = H5T_path_find(src->shared->u.compnd.memb[i].type, - dst->shared->u.compnd.memb[src2dst[i]].type, NULL, NULL, dxpl_id); + dst->shared->u.compnd.memb[src2dst[i]].type, NULL, NULL, dxpl_id, FALSE); if (NULL==(priv->memb_path[i] = tpath)) { H5MM_xfree(priv->src2dst); @@ -2725,7 +2725,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, dst_base_size=H5T_get_size(dst->shared->parent); /* Set up conversion path for base elements */ - if (NULL==(tpath=H5T_path_find(src->shared->parent, dst->shared->parent, NULL, NULL, dxpl_id))) { + if (NULL==(tpath=H5T_path_find(src->shared->parent, dst->shared->parent, NULL, NULL, dxpl_id, FALSE))) { HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatypes"); } else if (!H5T_path_noop(tpath)) { if ((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->shared->parent, H5T_COPY_ALL)))<0 || @@ -3033,7 +3033,7 @@ H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, dst_delta = direction * (buf_stride ? buf_stride : dst->shared->size); /* Set up conversion path for base elements */ - if (NULL==(tpath=H5T_path_find(src->shared->parent, dst->shared->parent, NULL, NULL, dxpl_id))) { + if (NULL==(tpath=H5T_path_find(src->shared->parent, dst->shared->parent, NULL, NULL, dxpl_id, FALSE))) { HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatypes"); } else if (!H5T_path_noop(tpath)) { if ((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->shared->parent, H5T_COPY_ALL)))<0 || |