mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
446 B
21 lines
446 B
=proto
|
|
void *duk_to_fixed_buffer(duk_context *ctx, duk_idx_t index, duk_size_t *out_size);
|
|
|
|
=stack
|
|
[ ... val! ... ]
|
|
|
|
=summary
|
|
<p>Like <code><a href="#duk_to_buffer">duk_to_buffer()</a></code> but if
|
|
the value is a dynamic buffer, convert it to a fixed buffer. The result
|
|
is thus always a fixed buffer (unless an error is thrown).</p>
|
|
|
|
=example
|
|
duk_size_t sz;
|
|
void *buf = duk_to_fixed_buffer(ctx, -3, &sz);
|
|
|
|
=tags
|
|
stack
|
|
buffer
|
|
|
|
=introduced
|
|
1.0.0
|
|
|