From: Fabrice Bellard Date: Mon, 28 Sep 2026 10:31:48 +0000 (+0200) Subject: added clarification for the JS_PrintValue callback (#558) X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=22f8302d7da9364a43ebfe05e2faa03448e13345;p=quickjs.git added clarification for the JS_PrintValue callback (#558) --- diff --git a/quickjs.c b/quickjs.c index c274507..420a174 100644 --- a/quickjs.c +++ b/quickjs.c @@ -14455,6 +14455,8 @@ void JS_PrintValueSetDefaultOptions(JSPrintValueOptions *options) options->max_item_count = 100; } +/* Note: the 'write_func' callback shall not modify the values which + are being printed */ static void JS_PrintValueInternal(JSRuntime *rt, JSContext *ctx, JSPrintValueWrite *write_func, void *write_opaque, JSValueConst val, const JSPrintValueOptions *options)