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.
27 lines
528 B
27 lines
528 B
name: duk_require_heapptr
|
|
|
|
proto: |
|
|
void *duk_require_heapptr(duk_context *ctx, duk_idx_t idx);
|
|
|
|
stack: |
|
|
[ ... val! ... ]
|
|
|
|
summary: |
|
|
<p>Like <code><a href="#duk_get_heapptr">duk_get_heapptr()</a></code>,
|
|
but throws an error if the value at <code>idx</code> is not a Duktape
|
|
heap allocated value (object, buffer, string) or if the index is invalid.</p>
|
|
|
|
example: |
|
|
void *ptr;
|
|
|
|
ptr = duk_require_heapptr(ctx, -3);
|
|
|
|
tags:
|
|
- stack
|
|
- borrowed
|
|
|
|
seealso:
|
|
- duk_get_heapptr
|
|
- duk_push_heapptr
|
|
|
|
introduced: 1.1.0
|
|
|