]> git.kaiwu.me - njs.git/commit
Change: removed byte strings API.
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 18 May 2024 04:54:50 +0000 (21:54 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Sat, 18 May 2024 04:54:50 +0000 (21:54 -0700)
commit5730d5ffe23a4965c001d873695d22005fcfa588
tree385cac68617efbf90e073c7c82fb78f59bce385e
parentde552ba66e2851cbe57f32f7c47a38460290a6d5
Change: removed byte strings API.

These functions are unsafe because they produce byte strings.
Byte strings may not work as expected with the existing JS methods.

The following functions were removed:
    - njs_vm_value_string_set() use njs_vm_value_string_create() as a
    drop-in replacement.
    - njs_vm_value_string_alloc() use njs_chb_t and
    njs_vm_value_string_create_chb() instead.

This fixes #710 on Github.
16 files changed:
external/njs_query_string_module.c
external/njs_shell.c
external/njs_webcrypto_module.c
external/njs_xml_module.c
nginx/ngx_http_js_module.c
nginx/ngx_js.c
nginx/ngx_js.h
nginx/ngx_js_fetch.c
nginx/ngx_js_shared_dict.c
nginx/ngx_stream_js_module.c
src/njs.h
src/njs_string.c
src/njs_vm.c
src/test/njs_benchmark.c
src/test/njs_externals_test.c
src/test/njs_unit_test.c