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: |

Like duk_to_buffer() 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).

example: | duk_size_t sz; void *buf = duk_to_fixed_buffer(ctx, -3, &sz); tags: - stack - buffer introduced: 1.0.0