#define P99_PZERO (   X,
)    (memset((X), 0, sizeof(X[0]) * N))

Zero out all bits in the object to which X points.

X can be a pointer or an array

T *A;
T B[3];
PZERO(A, 29);
PZERO(B, 2);

Here the first call zeroes out 29 elements of type T starting at the memory to which A points. The second zeroes out the first two elements of the array B.

This is a macro not a function, but nevertheless, X is evaluated only once.

See also
P99_MEMZERO for a macro that initializes to a default value that is guaranteed to correspond to the type.
argument 0 maybe evaluated several times for its type but only once for its value

Definition at line 64 of file p99_new.h.