]> Savannah Git Hosting - gnulib.git/commit
xalloc: new idx_t-based allocators
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 Jun 2021 00:18:57 +0000 (17:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 Jun 2021 00:20:11 +0000 (17:20 -0700)
commit61d866244d7ce4a89a5ed46b768bcace9247d8e8
tree16c8098026320dda39a9b561cc1db48be53e1e61
parentf1698a709865b6fea53f1c417c8cb1db5dec4adc
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.
ChangeLog
lib/xalloc.h
lib/xmalloc.c
modules/xalloc