=proto void *duk_push_buffer(duk_context *ctx, size_t size, int dynamic); =stack [ ... ] -> [ ... buf! ] =summary
Allocate a new buffer of size
bytes and push it to the value stack.
Returns a non-NULL
pointer to the buffer data area; for a zero-size buffer,
may return either NULL
or non-NULL
. The buffer data area is
automatically zeroed. If dynamic
is non-zero, the buffer will be resizable,
otherwise the buffer will have a fixed size. Throws an error if allocation fails.
There are also shortcut variants
duk_push_fixed_buffer()
and
duk_push_dynamic_buffer()
.