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.
 
 
 
 
 
 

15 lines
369 B

#include <stdio.h>
#include "duktape.h"
#include "duk_v1_compat.h"
void duk_dump_context_stdout(duk_context *ctx) {
duk_push_context_dump(ctx);
fprintf(stdout, "%s\n", duk_safe_to_string(ctx, -1));
duk_pop(ctx);
}
void duk_dump_context_stderr(duk_context *ctx) {
duk_push_context_dump(ctx);
fprintf(stderr, "%s\n", duk_safe_to_string(ctx, -1));
duk_pop(ctx);
}