Re: [PATCH 4/8] xalloc: new function xreallocarray

2021-10-19 Thread Paul Eggert
On 4/21/21 17:18, Bruno Haible wrote: xnmalloc and XNMALLOC take 2 arguments, whereas xreallocarray takes 3 arguments. It is often possible to express a function with a simple interface as a special case of a more complex function. If, in many use-cases, the simpler function is sufficient, users

Re: [PATCH 4/8] xalloc: new function xreallocarray

2021-04-22 Thread Paul Eggert
On 4/21/21 5:18 PM, Bruno Haible wrote: I disagree that xnmalloc should be deprecated. I agree. That was a thinko in my ChangeLog entry; I meant to write "xnrealloc". Sorry about that. I installed the attached. >From ca883666cb34922d9ab1bd0ac0101970c7aa3910 Mon Sep 17 00:00:00 2001 From: Paul

Re: [PATCH 4/8] xalloc: new function xreallocarray

2021-04-21 Thread Bruno Haible
Paul Eggert wrote: > + xalloc: new function xreallocarray > + This effectively replaces xnmalloc, which perhaps should be deprecated. > + The name xreallocarray should be easier to remember now that > + reallocarray is a standard GNU function. I disagree that xnmalloc should be dep

[PATCH 4/8] xalloc: new function xreallocarray

2021-04-18 Thread Paul Eggert
This effectively replaces xnmalloc, which perhaps should be deprecated. The name xreallocarray should be easier to remember now that reallocarray is a standard GNU function. * lib/xalloc.h [GNULIB_XALLOC]: Do not include xalloc-oversized.h. (xnmalloc, xnrealloc, x2nrealloc): Simplify by using xreal