diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-06-11 17:18:57 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-06-11 17:20:11 -0700 |
commit | 61d866244d7ce4a89a5ed46b768bcace9247d8e8 (patch) | |
tree | 16c8098026320dda39a9b561cc1db48be53e1e61 /modules | |
parent | f1698a709865b6fea53f1c417c8cb1db5dec4adc (diff) | |
download | gnulib-61d866244d7ce4a89a5ed46b768bcace9247d8e8.tar.gz |
xalloc: new idx_t-based allocators
This is for code that prefers to use idx_t for sizes.
* lib/xalloc.h (ximalloc, xizalloc, xicalloc, xirealloc)
(xireallocarray, ximemdup, ximemdup0) [GNULIB_XALLOC]:
New decls.
(x2nrealloc): Now just a decl, as the body is moved into xmalloc.c.
* lib/xmalloc.c: Include ialloc.h.
Rename some local parameters to be consistent with the .h files.
(nonnull): New static function.
(xmalloc, xcalloc): Simplify by using nonnull.
(ximalloc, xirealloc, xireallocarray, xizalloc, xicalloc)
(ximemdup, ximemdup0): New functions.
(x2nrealloc): Moved here from xalloc.h.
* modules/xalloc (Depends-on): Add ialloc.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/xalloc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/xalloc b/modules/xalloc index 0dbae1c864..0fc3836c2c 100644 --- a/modules/xalloc +++ b/modules/xalloc @@ -10,6 +10,7 @@ Depends-on: c99 calloc-gnu extern-inline +ialloc idx intprops malloc-gnu |