name: duk_require_pointer proto: | void *duk_require_pointer(duk_context *ctx, duk_idx_t idx); stack: | [ ... val! ... ] summary: |

Like duk_get_pointer(), but throws an error if the value at idx is not a pointer or if the index is invalid.

example: | void *ptr; ptr = duk_require_pointer(ctx, -3); printf("my pointer is: %p\n", ptr); tags: - stack introduced: 1.0.0