=proto void *duk_to_buffer(duk_context *ctx, duk_idx_t index, duk_size_t *out_size); =stack [ ... val! ... ] -> [ ... buffer(val)! ... ] =summary
Replace the value at index
with a buffer-coerced value. Returns
a pointer to the buffer data (may be NULL
for a zero-size buffer),
and writes the size of the buffer into *out_size
(if out_size
is non-NULL
). If index
is invalid, throws an error.
Coercion rules: