diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /src/H5Tvlen.c | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'src/H5Tvlen.c')
-rw-r--r-- | src/H5Tvlen.c | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index 0fcf8c9..c1d6072 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -191,7 +191,7 @@ H5T__vlen_create(const H5T_t *base) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(base); + assert(base); /* Build new type */ if (NULL == (dt = H5T__alloc())) @@ -251,14 +251,14 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) FUNC_ENTER_PACKAGE /* check parameters */ - HDassert(dt); - HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC); + assert(dt); + assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC); /* Only change the location if it's different */ if (loc != dt->shared->u.vlen.loc || file != dt->shared->u.vlen.file) { switch (loc) { case H5T_LOC_MEMORY: /* Memory based VL datatype */ - HDassert(NULL == file); + assert(NULL == file); /* Mark this type as being stored in memory */ dt->shared->u.vlen.loc = H5T_LOC_MEMORY; @@ -278,7 +278,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) dt->shared->u.vlen.cls = &H5T_vlen_mem_str_g; } /* end else-if */ else - HDassert(0 && "Invalid VL type"); + assert(0 && "Invalid VL type"); /* Release owned file */ if (dt->shared->owned_vol_obj) { @@ -296,7 +296,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0}; H5VL_file_get_args_t vol_cb_args; /* Arguments to VOL callback */ - HDassert(file); + assert(file); /* Mark this type as being stored on disk */ dt->shared->u.vlen.loc = H5T_LOC_DISK; @@ -373,13 +373,13 @@ H5T__vlen_mem_seq_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si FUNC_ENTER_PACKAGE_NOERR /* Check parameter */ - HDassert(_vl); - HDassert(len); + assert(_vl); + assert(len); /* Copy to ensure correct alignment. memcpy is best here because * it optimizes to fast code. */ - HDmemcpy(&vl, _vl, sizeof(hvl_t)); + memcpy(&vl, _vl, sizeof(hvl_t)); *len = vl.len; @@ -406,9 +406,9 @@ H5T__vlen_mem_seq_getptr(void *_vl) FUNC_ENTER_PACKAGE_NOERR /* check parameters, return result */ - HDassert(_vl); + assert(_vl); /* Copy to ensure correct alignment. */ - HDmemcpy(&vl, _vl, sizeof(hvl_t)); + memcpy(&vl, _vl, sizeof(hvl_t)); FUNC_LEAVE_NOAPI(vl.p) } /* end H5T__vlen_mem_seq_getptr() */ @@ -433,10 +433,10 @@ H5T__vlen_mem_seq_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb FUNC_ENTER_PACKAGE_NOERR /* Check parameters */ - HDassert(_vl); + assert(_vl); /* Copy to ensure correct alignment. */ - HDmemcpy(&vl, _vl, sizeof(hvl_t)); + memcpy(&vl, _vl, sizeof(hvl_t)); *isnull = ((vl.len == 0 || vl.p == NULL) ? TRUE : FALSE); @@ -463,7 +463,7 @@ H5T__vlen_mem_seq_setnull(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void H5 FUNC_ENTER_PACKAGE_NOERR /* check parameters */ - HDassert(_vl); + assert(_vl); /* Set the "nil" hvl_t */ vl.len = 0; @@ -495,11 +495,11 @@ H5T__vlen_mem_seq_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf, FUNC_ENTER_PACKAGE_NOERR /* check parameters, copy data */ - HDassert(buf); - HDassert(_vl); + assert(buf); + assert(_vl); /* Copy to ensure correct alignment. */ - HDmemcpy(&vl, _vl, sizeof(hvl_t)); - HDassert(vl.p); + memcpy(&vl, _vl, sizeof(hvl_t)); + assert(vl.p); H5MM_memcpy(buf, vl.p, len); @@ -528,8 +528,8 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc FUNC_ENTER_PACKAGE /* check parameters */ - HDassert(_vl); - HDassert(buf); + assert(_vl); + assert(buf); if (seq_len) { size_t len = seq_len * base_size; /* Sequence size */ @@ -541,7 +541,7 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc "application memory allocation routine failed for VL data") } /* end if */ else /* Default to system malloc */ - if (NULL == (vl.p = HDmalloc(len))) + if (NULL == (vl.p = malloc(len))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data") /* Copy the data into the newly allocated buffer */ @@ -580,10 +580,10 @@ H5T__vlen_mem_str_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si FUNC_ENTER_PACKAGE_NOERR /* check parameters */ - HDassert(_vl); + assert(_vl); /* Copy to ensure correct alignment. */ - HDmemcpy(&s, _vl, sizeof(char *)); + memcpy(&s, _vl, sizeof(char *)); *len = HDstrlen(s); @@ -610,9 +610,9 @@ H5T__vlen_mem_str_getptr(void *_vl) FUNC_ENTER_PACKAGE_NOERR /* check parameters */ - HDassert(_vl); + assert(_vl); /* Copy to ensure correct alignment. */ - HDmemcpy(&s, _vl, sizeof(char *)); + memcpy(&s, _vl, sizeof(char *)); FUNC_LEAVE_NOAPI(s) } /* end H5T__vlen_mem_str_getptr() */ @@ -637,7 +637,7 @@ H5T__vlen_mem_str_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb FUNC_ENTER_PACKAGE_NOERR /* Copy to ensure correct alignment. */ - HDmemcpy(&s, _vl, sizeof(char *)); + memcpy(&s, _vl, sizeof(char *)); *isnull = (s == NULL ? TRUE : FALSE); @@ -690,10 +690,10 @@ H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf, if (len > 0) { /* check parameters */ - HDassert(buf); - HDassert(_vl); + assert(buf); + assert(_vl); /* Copy to ensure correct alignment. */ - HDmemcpy(&s, _vl, sizeof(char *)); + memcpy(&s, _vl, sizeof(char *)); H5MM_memcpy(buf, s, len); } /* end if */ @@ -724,7 +724,7 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc FUNC_ENTER_PACKAGE /* check parameters */ - HDassert(buf); + assert(buf); /* Use the user's memory allocation routine if one is defined */ if (vl_alloc_info->alloc_func != NULL) { @@ -734,7 +734,7 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc "application memory allocation routine failed for VL data") } /* end if */ else /* Default to system malloc */ - if (NULL == (t = (char *)HDmalloc((seq_len + 1) * base_size))) + if (NULL == (t = (char *)malloc((seq_len + 1) * base_size))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data") /* 'write' the string into the buffer, with memcpy() */ @@ -769,8 +769,8 @@ H5T__vlen_disk_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, size_ FUNC_ENTER_PACKAGE_NOERR /* Check parameters */ - HDassert(vl); - HDassert(seq_len); + assert(vl); + assert(seq_len); /* Get length of sequence (different from blob size) */ UINT32DECODE(vl, *seq_len); @@ -800,9 +800,9 @@ H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull) FUNC_ENTER_PACKAGE /* Check parameters */ - HDassert(file); - HDassert(vl); - HDassert(isnull); + assert(file); + assert(vl); + assert(isnull); /* Skip the sequence's length */ vl += 4; @@ -841,8 +841,8 @@ H5T__vlen_disk_setnull(H5VL_object_t *file, void *_vl, void *bg) FUNC_ENTER_PACKAGE /* check parameters */ - HDassert(file); - HDassert(vl); + assert(file); + assert(vl); /* Free heap object for old data */ if (bg != NULL) @@ -885,9 +885,9 @@ H5T__vlen_disk_read(H5VL_object_t *file, void *_vl, void *buf, size_t len) FUNC_ENTER_PACKAGE /* Check parameters */ - HDassert(file); - HDassert(vl); - HDassert(buf); + assert(file); + assert(vl); + assert(buf); /* Skip the length of the sequence */ vl += 4; @@ -923,9 +923,9 @@ H5T__vlen_disk_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t H5_ATTR_UN FUNC_ENTER_PACKAGE /* check parameters */ - HDassert(vl); - HDassert(seq_len == 0 || buf); - HDassert(file); + assert(vl); + assert(seq_len == 0 || buf); + assert(file); /* Free heap object for old data, if non-NULL */ if (bg != NULL) @@ -964,7 +964,7 @@ H5T__vlen_disk_delete(H5VL_object_t *file, void *_vl) FUNC_ENTER_PACKAGE /* Check parameters */ - HDassert(file); + assert(file); /* Free heap object for old data */ if (vl != NULL) { @@ -1012,9 +1012,9 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info FUNC_ENTER_NOAPI(FAIL) /* Sanity checks */ - HDassert(elem); - HDassert(dt); - HDassert(alloc_info); + assert(elem); + assert(dt); + assert(alloc_info); free_func = alloc_info->free_func; free_info = alloc_info->free_info; @@ -1074,7 +1074,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info if (free_func != NULL) (*free_func)(vl->p, free_info); else - HDfree(vl->p); + free(vl->p); } /* end if */ } else if (dt->shared->u.vlen.type == H5T_VLEN_STRING) { @@ -1082,10 +1082,10 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info if (free_func != NULL) (*free_func)(*(char **)elem, free_info); else - HDfree(*(char **)elem); + free(*(char **)elem); } else { - HDassert(0 && "Invalid VL type"); + assert(0 && "Invalid VL type"); } /* end else */ break; @@ -1135,8 +1135,8 @@ H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt) H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */ herr_t ret_value = SUCCEED; /* return value */ - HDassert(dt); - HDassert(elem); + assert(dt); + assert(elem); FUNC_ENTER_NOAPI(FAIL) |