#[unsafe(no_mangle)]pub unsafe extern "C" fn JS_PrintValueSetDefaultOptions(
options: *mut JSPrintValueOptions,
)Expand description
JS_PrintValueSetDefaultOptions: the options a fresh JSPrintValueOptions should hold.
Not zeros: the reference fills in max_depth = 2, max_string_length = 1000 and
max_item_count = 100. This function used to write zeros and the symbol table said that
was “the header’s default” — the header says nothing of the kind, and its implementation
in quickjs.c is five lines of explicit assignment. A host that called this and then
JS_PrintValue got an unbounded dump where the reference truncates at depth 2.
§Safety
options must be writable.