mirror of
https://github.com/ivabus/pantry
synced 2024-11-30 04:05:06 +03:00
10 lines
260 B
C
10 lines
260 B
C
|
#include <stdio.h>
|
||
|
#include "duktape.h"
|
||
|
|
||
|
int main(int argc, char *argv[]) {
|
||
|
duk_context *ctx = duk_create_heap_default();
|
||
|
duk_eval_string(ctx, "1 + 2");
|
||
|
printf("1 + 2 = %d\\n", (int) duk_get_int(ctx, -1));
|
||
|
duk_destroy_heap(ctx);
|
||
|
return 0;
|
||
|
}
|