Re: [PATCH 1/2] add COPY_ARRAY

2016-09-25 Thread René Scharfe
Am 25.09.2016 um 09:41 schrieb Jeff King: On Sun, Sep 25, 2016 at 09:15:42AM +0200, René Scharfe wrote: It checks if the multiplication of size and element count overflows. The inferred size is passed first to st_mult, which allows the division there to be done at compilation time. I wonder

Re: [PATCH 1/2] add COPY_ARRAY

2016-09-25 Thread Jeff King
On Sun, Sep 25, 2016 at 09:15:42AM +0200, René Scharfe wrote: > Add COPY_ARRAY, a safe and convenient helper for copying arrays, > complementing ALLOC_ARRAY and REALLOC_ARRAY. Users just specify source, > destination and the number of elements; the size of an element is > inferred automatically.