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.
 
 
 
 
 
 

22 lines
515 B

name: duk_to_fixed_buffer
proto: |
void *duk_to_fixed_buffer(duk_context *ctx, duk_idx_t idx, 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 or an external 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