Thread (10 messages) flat view 10 messages, 4 authors, 2016-06-15

Re: [PATCH 1/2] add macro REALLOCARRAY

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:32

On Sun, Sep 14, 2014 at 9:55 AM, René Scharfe [off-list ref] wrote:
+#define REALLOCARRAY(x, alloc) x = xrealloc((x), (alloc) * sizeof(*(x)))
I have been wondering if "x" could be an expression that has an operator
that binds weaker than the assignment '='.  That may necessitate the LHS
of the assignment to be somehow marked as bound the tightest, i.e.

#define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x)))

Or am I being overly silly?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help