mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
d5a7f8c394
new file: projects/duktape.org/test.c new file: projects/duktape.org/test.js
10 lines
No EOL
260 B
C
10 lines
No EOL
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;
|
|
} |