name: duk_to_int32 proto: | duk_int32_t duk_to_int32(duk_context *ctx, duk_idx_t idx); stack: | [ ... val! ... ] -> [ ... ToInt32(val)! ... ] summary: |

Replace the value at idx with an Ecmascript ToInt32() coerced value. Returns the coerced value. If idx is invalid, throws an error.

example: | printf("ToInt32(): %ld\n", (long) duk_to_int32(ctx, -3)); tags: - stack introduced: 1.0.0