summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-09-14 21:54:19 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-09-14 21:54:19 (GMT)
commit1143f47e2d560a5283c24b42a64b9587f5613fab (patch)
treeb09ca96ea8a803db310c12ebd4ee583c572fe2bf /src/H5A.c
parentf7c075c736d3a4615cc78308111c235a91dbdc5d (diff)
downloadhdf5-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/H5A.c')
-rw-r--r--src/H5A.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5A.c b/src/H5A.c
index dc903d9..42dcfa2 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -674,7 +674,7 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id)
/* Convert memory buffer into disk buffer */
/* Set up type conversion function */
- if (NULL == (tpath = H5T_path_find(mem_type, attr->dt, NULL, NULL, dxpl_id)))
+ if (NULL == (tpath = H5T_path_find(mem_type, attr->dt, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dst datatypes")
/* Check for type conversion required */
@@ -840,7 +840,7 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id)
else { /* Attribute exists and has a value */
/* Convert memory buffer into disk buffer */
/* Set up type conversion function */
- if (NULL == (tpath = H5T_path_find(attr->dt, mem_type, NULL, NULL, dxpl_id)))
+ if (NULL == (tpath = H5T_path_find(attr->dt, mem_type, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dst datatypes")
/* Check for type conversion required */