Last active
August 29, 2015 14:25
-
-
Save muja/5f61df530377c5e59f7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctx = duk_create_heap(None, None, None, ptr::null_mut(), None) | |
duk_push_string(ctx, "function x() { return '4'; }"); | |
duk_push_string(ctx, "<eval>"); | |
duk_eval_raw(ctx, 0, 0, DUK_COMPILE_FUNCTION); | |
value = duk_get_string(ctx, 0); | |
duk_destroy_heap(ctx); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment