diff options
Diffstat (limited to 'src/H5Ofill.c')
-rw-r--r-- | src/H5Ofill.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 840ea01..3bfff1a 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -308,15 +308,10 @@ H5O_fill_debug(H5F_t __unused__ *f, const void *_mesg, FILE *stream, herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type) { - H5T_cdata_t *cdata=NULL; /*conversion data */ - H5T_conv_t cfunc=NULL; /*conversion function */ + H5T_path_t *tpath=NULL; /*type conversion info */ void *buf=NULL, *bkg=NULL; /*conversion buffers */ - herr_t status; /*conversion status */ hid_t src_id=-1, dst_id=-1; /*data type identifiers */ herr_t ret_value=FAIL; /*return value */ -#ifdef H5T_DEBUG - H5_timer_t timer; /*debugging timer */ -#endif FUNC_ENTER(H5O_fill_convert, FAIL); assert(fill); @@ -332,7 +327,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type) /* * Can we convert between source and destination data types? */ - if (NULL==(cfunc=H5T_find(fill->type, dset_type, H5T_BKG_NO, &cdata))) { + if (NULL==(tpath=H5T_path_find(fill->type, dset_type, NULL, NULL))) { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and dst data types"); } @@ -357,22 +352,14 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type) } HDmemcpy(buf, fill->buf, H5T_get_size(fill->type)); } - if (cdata->need_bkg>=H5T_BKG_TEMP && + if (tpath->cdata.need_bkg>=H5T_BKG_TEMP && NULL==(bkg=H5MM_malloc(H5T_get_size(dset_type)))) { HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); } /* Do the conversion */ -#ifdef H5T_DEBUG - H5T_timer_begin(&timer, cdata); -#endif - cdata->command = H5T_CONV_CONV; - status = (cfunc)(src_id, dst_id, cdata, 1, buf, bkg); -#ifdef H5T_DEBUG - H5T_timer_end(&timer, cdata, 1); -#endif - if (status<0) { + if (H5T_convert(tpath, src_id, dst_id, 1, buf, bkg)<0) { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed"); } |