diff options
Diffstat (limited to 'run-test262.c')
-rw-r--r-- | run-test262.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/run-test262.c b/run-test262.c index d1fa4f3..3da79a0 100644 --- a/run-test262.c +++ b/run-test262.c @@ -372,6 +372,12 @@ static void enumerate_tests(const char *path) namelist_cmp_indirect); } +static void js_print_value_write(void *opaque, const char *buf, size_t len) +{ + FILE *fo = opaque; + fwrite(buf, 1, len, fo); +} + static JSValue js_print(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { @@ -397,7 +403,7 @@ static JSValue js_print(JSContext *ctx, JSValueConst this_val, fwrite(str, 1, len, outfile); JS_FreeCString(ctx, str); } else { - JS_PrintValue(ctx, outfile, v, NULL); + JS_PrintValue(ctx, js_print_value_write, outfile, v, NULL); } } fputc('\n', outfile); |