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.
30 lines
624 B
30 lines
624 B
name: duk_get_magic
|
|
|
|
proto: |
|
|
duk_int_t duk_get_magic(duk_context *ctx, duk_idx_t idx);
|
|
|
|
stack: |
|
|
[ ... val! ... ]
|
|
|
|
summary: |
|
|
<p>Get the 16-bit signed "magic" value associated with the Duktape/C function
|
|
at <code>idx</code>. If the value is not a Duktape/C function, an error is
|
|
thrown.</p>
|
|
|
|
<div class="note">
|
|
Lightweight functions have space for only <b>8</b> magic value bits which is
|
|
interpreted as a signed integer (-128 to 127).
|
|
</div>
|
|
|
|
example: |
|
|
duk_int_t my_flags = duk_get_magic(ctx, -3);
|
|
|
|
tags:
|
|
- function
|
|
- magic
|
|
|
|
seealso:
|
|
- duk_get_current_magic
|
|
- duk_set_magic
|
|
|
|
introduced: 1.0.0
|
|
|