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.
 
 
 
 
 
 

23 lines
456 B

name: duk_require_pointer
proto: |
void *duk_require_pointer(duk_context *ctx, duk_idx_t idx);
stack: |
[ ... val! ... ]
summary: |
<p>Like <code><a href="#duk_get_pointer">duk_get_pointer()</a></code>,
but throws an error if the value at <code>idx</code> is not a pointer
or if the index is invalid.</p>
example: |
void *ptr;
ptr = duk_require_pointer(ctx, -3);
printf("my pointer is: %p\n", ptr);
tags:
- stack
introduced: 1.0.0