* lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Nov 2006 21:24:35 +0000 (21:24 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Nov 2006 21:24:35 +0000 (21:24 +0000)
commitac2a728a11acdae91051359487c52acc9d180a8e
tree609637805447a082b6621a4a4332d88c5888c640
parent0c0219f84c3c29237187f0640248eef23c815900
* lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
inline functions that are identical with the old xnmalloc_inline,
xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
that we can avoid some unnecessary integer multiplications and
divisions in the common case where the element size is known at
compile time.
(XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
needed.
(xnboundedmalloc): Remove.
(XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
arguments, for consistency with rest of this header.
(xcharalloc): Rewrite using XNMALLOC.
* lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
(xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
versions have been moved to lib/xalloc.h and renamed to be the
non-*_inline versions.
(xmalloc, xrealloc): Implement without reference to the xnmalloc
and xnrealloc functions, since those functions are now inline and
now call us.
(x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
renaming described above.
ChangeLog
lib/xalloc.h
lib/xmalloc.c