@scriptc/cli-darwin-x64 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES +1 -1
- package/dist/bin/scriptc +0 -0
- package/dist/bin/scriptc.json +1 -1
- package/dist/lib/declarations/scriptc-node-fallback.d.ts +972 -245
- package/dist/lib/declarations/scriptc-overrides.d.ts +5 -1
- package/dist/lib/declarations/scriptc.d.ts +22 -2
- package/dist/lib/llvm/bin/scriptc-llvm-codegen +0 -0
- package/dist/lib/llvm/package.json +1 -1
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dgram.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_fetch.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_readline.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_tls.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_bigint_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_crypto_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_dc.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_dgram.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_dyn_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_fetch.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_ffi.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_ffi_queue.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_http.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_http2.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_inspect.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_loop_epoll.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_loop_kqueue.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_loop_wsapoll.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_net.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_path.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_qs.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_readline.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_test.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_tls.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_tls_ca.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_util.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_util_style.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_watch.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default-workers/scr_zlib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dgram.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_island.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_readline.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_tls.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/text-decoder-legacy-workers/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/workers/scr_mailbox.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/workers/scr_message.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/workers/scr_worker.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/workers/scr_worker_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_inspect.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_zlib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_inspect.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_zlib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dgram.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_fetch.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_readline.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_tls.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_bigint_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_crypto_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_dc.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_dgram.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_dyn_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_fetch.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_ffi.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_ffi_queue.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_http.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_http2.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_inspect.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_loop_epoll.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_loop_kqueue.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_loop_wsapoll.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_net.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_path.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_qs.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_readline.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_test.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_tls.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_tls_ca.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_util.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_util_style.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_watch.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default-workers/scr_zlib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_closure.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_context.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dgram.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events_emitter.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_island.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_readline.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_shared.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_tls.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_union.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/text-decoder-legacy-workers/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/workers/scr_mailbox.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/workers/scr_message.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/workers/scr_worker.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/workers/scr_worker_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/package.json +1 -1
- package/dist/lib/runtime-darwin-x64/runtime-pack.json +3318 -790
- package/dist/lib/runtime-sources/package.json +1 -1
- package/dist/lib/runtime-sources/src/scr_array.c +479 -46
- package/dist/lib/runtime-sources/src/scr_assert.c +3 -3
- package/dist/lib/runtime-sources/src/scr_async.c +401 -71
- package/dist/lib/runtime-sources/src/scr_async.test.ts +16 -6
- package/dist/lib/runtime-sources/src/scr_async_dyn.c +30 -30
- package/dist/lib/runtime-sources/src/scr_bytes.c +487 -221
- package/dist/lib/runtime-sources/src/scr_bytes.test.c +85 -0
- package/dist/lib/runtime-sources/src/scr_bytes_io.c +45 -64
- package/dist/lib/runtime-sources/src/scr_child.c +48 -30
- package/dist/lib/runtime-sources/src/scr_closure.c +21 -11
- package/dist/lib/runtime-sources/src/scr_console.c +27 -5
- package/dist/lib/runtime-sources/src/scr_context.c +167 -0
- package/dist/lib/runtime-sources/src/scr_context.test.c +118 -0
- package/dist/lib/runtime-sources/src/scr_context.test.ts +47 -0
- package/dist/lib/runtime-sources/src/scr_copying.c +13 -2
- package/dist/lib/runtime-sources/src/scr_cycle.c +112 -12
- package/dist/lib/runtime-sources/src/scr_dc.c +8 -8
- package/dist/lib/runtime-sources/src/scr_dgram.c +10 -7
- package/dist/lib/runtime-sources/src/scr_error.c +26 -14
- package/dist/lib/runtime-sources/src/scr_events.c +45 -31
- package/dist/lib/runtime-sources/src/scr_events_emitter.c +34 -1
- package/dist/lib/runtime-sources/src/scr_exception.c +26 -7
- package/dist/lib/runtime-sources/src/scr_fetch.c +23 -20
- package/dist/lib/runtime-sources/src/scr_fetch_curl.c +1 -1
- package/dist/lib/runtime-sources/src/scr_ffi.c +3 -3
- package/dist/lib/runtime-sources/src/scr_file_handle.c +1 -0
- package/dist/lib/runtime-sources/src/scr_http.c +20 -16
- package/dist/lib/runtime-sources/src/scr_http2.c +10 -8
- package/dist/lib/runtime-sources/src/scr_inspect.c +1 -0
- package/dist/lib/runtime-sources/src/scr_island.c +1 -1
- package/dist/lib/runtime-sources/src/scr_json.c +652 -189
- package/dist/lib/runtime-sources/src/scr_json.test.c +339 -1
- package/dist/lib/runtime-sources/src/scr_json.test.ts +59 -25
- package/dist/lib/runtime-sources/src/scr_key.h +92 -0
- package/dist/lib/runtime-sources/src/scr_lib.c +256 -136
- package/dist/lib/runtime-sources/src/scr_mailbox.c +233 -0
- package/dist/lib/runtime-sources/src/scr_mailbox.h +28 -0
- package/dist/lib/runtime-sources/src/scr_mailbox.test.c +86 -0
- package/dist/lib/runtime-sources/src/scr_mailbox.test.ts +46 -0
- package/dist/lib/runtime-sources/src/scr_map.c +240 -107
- package/dist/lib/runtime-sources/src/scr_message.c +443 -0
- package/dist/lib/runtime-sources/src/scr_message.h +14 -0
- package/dist/lib/runtime-sources/src/scr_message.test.c +152 -0
- package/dist/lib/runtime-sources/src/scr_message.test.ts +44 -0
- package/dist/lib/runtime-sources/src/scr_net.c +14 -12
- package/dist/lib/runtime-sources/src/scr_number.c +36 -4
- package/dist/lib/runtime-sources/src/scr_numeric.h +25 -0
- package/dist/lib/runtime-sources/src/scr_numeric.test.c +37 -0
- package/dist/lib/runtime-sources/src/scr_numeric.test.ts +33 -0
- package/dist/lib/runtime-sources/src/scr_object.c +9 -4
- package/dist/lib/runtime-sources/src/scr_path.c +1 -1
- package/dist/lib/runtime-sources/src/scr_readline.c +8 -8
- package/dist/lib/runtime-sources/src/scr_regex.c +351 -167
- package/dist/lib/runtime-sources/src/scr_runtime.h +207 -34
- package/dist/lib/runtime-sources/src/scr_shared.c +280 -0
- package/dist/lib/runtime-sources/src/scr_shared.test.c +113 -0
- package/dist/lib/runtime-sources/src/scr_shared.test.ts +45 -0
- package/dist/lib/runtime-sources/src/scr_stream.c +9 -9
- package/dist/lib/runtime-sources/src/scr_string.c +365 -141
- package/dist/lib/runtime-sources/src/scr_test.c +8 -8
- package/dist/lib/runtime-sources/src/scr_tls.c +12 -12
- package/dist/lib/runtime-sources/src/scr_tls_ca.c +34 -12
- package/dist/lib/runtime-sources/src/scr_union.c +10 -5
- package/dist/lib/runtime-sources/src/scr_util_compare.c +1 -0
- package/dist/lib/runtime-sources/src/scr_util_style.c +11 -11
- package/dist/lib/runtime-sources/src/scr_watch.c +16 -6
- package/dist/lib/runtime-sources/src/scr_worker.c +232 -0
- package/dist/lib/runtime-sources/src/scr_worker.h +42 -0
- package/dist/lib/runtime-sources/src/scr_worker.test.c +115 -0
- package/dist/lib/runtime-sources/src/scr_worker.test.ts +49 -0
- package/dist/lib/runtime-sources/src/scr_worker_events.c +443 -0
- package/dist/lib/runtime-sources/src/scr_zlib.c +6 -0
- package/package.json +1 -1
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#include "scr_runtime.h"
|
|
18
18
|
|
|
19
19
|
#include <ctype.h>
|
|
20
|
+
#ifdef SCR_WORKERS
|
|
21
|
+
#include <stdatomic.h>
|
|
22
|
+
static atomic_uint scr_process_mask;
|
|
23
|
+
static void scr_process_mask_init(void);
|
|
24
|
+
#endif
|
|
20
25
|
#include <dirent.h>
|
|
21
26
|
#include <errno.h>
|
|
22
27
|
#include <fcntl.h>
|
|
@@ -253,6 +258,10 @@ static bool scr_lib_same_executable_arg(const char *a, const char *b) {
|
|
|
253
258
|
* Load the documented OS parser from System32 without adding an executable-
|
|
254
259
|
* only shell dependency to the embedding runtime's link contract. */
|
|
255
260
|
static void scr_lib_prepare_utf8_argv(void) {
|
|
261
|
+
#ifdef SCR_WORKERS
|
|
262
|
+
/* Worker arguments were copied as UTF-8 before their native thread began. */
|
|
263
|
+
if (!scr_context_is_main()) return;
|
|
264
|
+
#endif
|
|
256
265
|
if (scr_lib_argv == NULL || scr_lib_argv_utf8 != NULL) return;
|
|
257
266
|
HMODULE shell = LoadLibraryExW(L"shell32.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
|
|
258
267
|
if (shell == NULL) scr_trap("could not load Windows command-line parser");
|
|
@@ -325,6 +334,9 @@ bool scr_lib_should_collapse_reexec_arg(ScrStr *cmd, ScrArr *args) {
|
|
|
325
334
|
* the archive's objects free of any atexit reference — the K8 ambient
|
|
326
335
|
* audit's bar). */
|
|
327
336
|
void scr_lib_init(int argc, char **argv) {
|
|
337
|
+
#ifdef SCR_WORKERS
|
|
338
|
+
if (scr_context_is_main()) scr_process_mask_init();
|
|
339
|
+
#endif
|
|
328
340
|
scr_lib_argc = argc;
|
|
329
341
|
scr_lib_argv = argv;
|
|
330
342
|
if (argc >= 2 && strncmp(argv[1], "--scriptc-fork=", 15) == 0) {
|
|
@@ -345,7 +357,7 @@ void scr_lib_init(int argc, char **argv) {
|
|
|
345
357
|
scr_lib_argv = scr_lib_argv_owned;
|
|
346
358
|
}
|
|
347
359
|
}
|
|
348
|
-
|
|
360
|
+
scr_atexit(scr_lib_cleanup);
|
|
349
361
|
}
|
|
350
362
|
#endif /* !SCR_LIB */
|
|
351
363
|
|
|
@@ -564,7 +576,7 @@ ScrStr *scr_process_platform(void) {
|
|
|
564
576
|
scr_platform_str = scr_str_new("unknown", 7);
|
|
565
577
|
#endif
|
|
566
578
|
#ifndef SCR_LIB
|
|
567
|
-
|
|
579
|
+
scr_atexit(scr_process_platform_cleanup);
|
|
568
580
|
#endif
|
|
569
581
|
}
|
|
570
582
|
return scr_str_retain(scr_platform_str);
|
|
@@ -586,7 +598,7 @@ ScrStr *scr_process_arch(void) {
|
|
|
586
598
|
scr_arch_str = scr_str_new("unknown", 7);
|
|
587
599
|
#endif
|
|
588
600
|
#ifndef SCR_LIB
|
|
589
|
-
|
|
601
|
+
scr_atexit(scr_process_arch_cleanup);
|
|
590
602
|
#endif
|
|
591
603
|
}
|
|
592
604
|
return scr_str_retain(scr_arch_str);
|
|
@@ -602,7 +614,7 @@ ScrStr *scr_process_versions_node(void) {
|
|
|
602
614
|
scr_versions_node_str =
|
|
603
615
|
scr_str_new(SCR_NODE_COMPAT_VERSION, sizeof(SCR_NODE_COMPAT_VERSION) - 1);
|
|
604
616
|
#ifndef SCR_LIB
|
|
605
|
-
|
|
617
|
+
scr_atexit(scr_process_versions_node_cleanup);
|
|
606
618
|
#endif
|
|
607
619
|
}
|
|
608
620
|
return scr_str_retain(scr_versions_node_str);
|
|
@@ -621,7 +633,7 @@ ScrStr *scr_process_versions_openssl(void) {
|
|
|
621
633
|
scr_versions_openssl_str =
|
|
622
634
|
scr_str_new(SCR_OPENSSL_COMPAT_VERSION, sizeof(SCR_OPENSSL_COMPAT_VERSION) - 1);
|
|
623
635
|
#ifndef SCR_LIB
|
|
624
|
-
|
|
636
|
+
scr_atexit(scr_process_versions_openssl_cleanup);
|
|
625
637
|
#endif
|
|
626
638
|
}
|
|
627
639
|
return scr_str_retain(scr_versions_openssl_str);
|
|
@@ -684,13 +696,19 @@ ScrStr *scr_process_exec_path(void) {
|
|
|
684
696
|
#endif
|
|
685
697
|
scr_exec_path_str = scr_str_new(use, strlen(use));
|
|
686
698
|
#ifndef SCR_LIB
|
|
687
|
-
|
|
699
|
+
scr_atexit(scr_process_exec_path_cleanup);
|
|
688
700
|
#endif
|
|
689
701
|
}
|
|
690
702
|
return scr_str_retain(scr_exec_path_str);
|
|
691
703
|
}
|
|
692
704
|
|
|
693
705
|
ScrStr *scr_env_get(const ScrStr *name) {
|
|
706
|
+
#ifdef SCR_WORKERS
|
|
707
|
+
if (!scr_context_is_main()) {
|
|
708
|
+
const char *value = scr_context_getenv(name->data);
|
|
709
|
+
return value ? scr_str_new(value, strlen(value)) : NULL;
|
|
710
|
+
}
|
|
711
|
+
#endif
|
|
694
712
|
/* ScrStr data is NUL-terminated (like the fs paths below). A fresh copy
|
|
695
713
|
* per read: getenv's buffer is not ours to alias, and Node's process.env
|
|
696
714
|
* reads snapshot the value too. Absent → NULL (the compiler's undefined
|
|
@@ -710,7 +728,7 @@ ScrStr *scr_env_get(const ScrStr *name) {
|
|
|
710
728
|
free(buf);
|
|
711
729
|
return s;
|
|
712
730
|
#else
|
|
713
|
-
const char *v =
|
|
731
|
+
const char *v = scr_getenv(name->data);
|
|
714
732
|
return v ? scr_str_new(v, strlen(v)) : NULL;
|
|
715
733
|
#endif
|
|
716
734
|
}
|
|
@@ -719,6 +737,9 @@ ScrStr *scr_env_get(const ScrStr *name) {
|
|
|
719
737
|
* children (posix_spawn inherits environ) observe the write, like Node.
|
|
720
738
|
* Both args borrowed (NUL-terminated ScrStr data); setenv copies. */
|
|
721
739
|
void scr_env_set(const ScrStr *name, const ScrStr *value) {
|
|
740
|
+
#ifdef SCR_WORKERS
|
|
741
|
+
if (scr_context_env_set(name->data, value->data)) return;
|
|
742
|
+
#endif
|
|
722
743
|
#ifdef _WIN32
|
|
723
744
|
/* The WIN32 environment (see scr_env_get): an empty value stays a
|
|
724
745
|
* present-but-empty variable, and children inherit the write. */
|
|
@@ -731,6 +752,9 @@ void scr_env_set(const ScrStr *name, const ScrStr *value) {
|
|
|
731
752
|
/* `delete process.env.NAME` — unsetenv(3): later reads answer absent and
|
|
732
753
|
* spawned children lose the variable, like Node. Borrowed. */
|
|
733
754
|
void scr_env_unset(const ScrStr *name) {
|
|
755
|
+
#ifdef SCR_WORKERS
|
|
756
|
+
if (scr_context_env_set(name->data, NULL)) return;
|
|
757
|
+
#endif
|
|
734
758
|
#ifdef _WIN32
|
|
735
759
|
SetEnvironmentVariableA(name->data, NULL);
|
|
736
760
|
#else
|
|
@@ -886,6 +910,7 @@ void scr_fs_invalid_named_path(const ScrDyn *value, const ScrStr *path, const ch
|
|
|
886
910
|
scr_jb_puts(&b, "' must be a string, Uint8Array, or URL without null bytes. Received ");
|
|
887
911
|
if (value->kind == SCR_DYN_BYTES) {
|
|
888
912
|
const ScrBytes *bytes = value->v.bytes;
|
|
913
|
+
SCR_SHARED_GUARD(bytes, NULL);
|
|
889
914
|
if (value->buffer) {
|
|
890
915
|
scr_jb_puts(&b, "<Buffer");
|
|
891
916
|
for (size_t i = 0; i < bytes->len; i++) {
|
|
@@ -936,7 +961,7 @@ void scr_process_load_env_file(const ScrDyn *value) {
|
|
|
936
961
|
if (value->kind == SCR_DYN_UNDEF || value->kind == SCR_DYN_NULL) path = scr_str_new("./.env", 6);
|
|
937
962
|
else if (value->kind == SCR_DYN_STR) path = scr_str_retain(value->v.str);
|
|
938
963
|
else if (scr_dyn_native_url_is(value)) path = scr_url_to_path(value->v.handle.ptr);
|
|
939
|
-
else if (scr_dyn_bytes_is(value, SCR_BYTES_U8)) path =
|
|
964
|
+
else if (scr_dyn_bytes_is(value, SCR_BYTES_U8)) path = scr_bytes_string(value->v.bytes, 0, value->v.bytes->len);
|
|
940
965
|
else {
|
|
941
966
|
scr_dyn_arg_type_fail("path", "of type string or an instance of Buffer or URL", value);
|
|
942
967
|
return;
|
|
@@ -978,6 +1003,10 @@ void scr_process_load_env_file(const ScrDyn *value) {
|
|
|
978
1003
|
* (not producible by setenv) are skipped; the value is everything after
|
|
979
1004
|
* the FIRST '='. +1 array. */
|
|
980
1005
|
ScrArr *scr_env_pairs(void) {
|
|
1006
|
+
#ifdef SCR_WORKERS
|
|
1007
|
+
ScrArr *local = scr_context_env_pairs();
|
|
1008
|
+
if (local) return local;
|
|
1009
|
+
#endif
|
|
981
1010
|
ScrArr *out = scr_arr_new(SCR_ELEM_STR, 0);
|
|
982
1011
|
#ifdef _WIN32
|
|
983
1012
|
/* The WIN32 environment block (see scr_env_get): NUL-separated
|
|
@@ -1297,7 +1326,7 @@ bool scr_proc_stream_write(double fd, const ScrStr *data) {
|
|
|
1297
1326
|
* directory API. The env var covers every real session; abort matches
|
|
1298
1327
|
* the POSIX arm's stance on the unreachable failure. */
|
|
1299
1328
|
ScrStr *scr_os_homedir(void) {
|
|
1300
|
-
const char *home =
|
|
1329
|
+
const char *home = scr_getenv("USERPROFILE");
|
|
1301
1330
|
if (home && home[0] != '\0') return scr_str_new(home, strlen(home));
|
|
1302
1331
|
scr_trap("scriptc: os.homedir() failed\n");
|
|
1303
1332
|
}
|
|
@@ -1371,11 +1400,11 @@ ScrStr *scr_os_tmpdir(void) {
|
|
|
1371
1400
|
* physical-memory query. Keep the useful environment-backed answers and
|
|
1372
1401
|
* spell the platform explicitly for the rest. */
|
|
1373
1402
|
ScrStr *scr_os_homedir(void) {
|
|
1374
|
-
const char *home =
|
|
1403
|
+
const char *home = scr_getenv("HOME");
|
|
1375
1404
|
return scr_str_new(home ? home : "", home ? strlen(home) : 0);
|
|
1376
1405
|
}
|
|
1377
1406
|
ScrStr *scr_os_user_name(void) {
|
|
1378
|
-
const char *user =
|
|
1407
|
+
const char *user = scr_getenv("USER");
|
|
1379
1408
|
return scr_str_new(user ? user : "", user ? strlen(user) : 0);
|
|
1380
1409
|
}
|
|
1381
1410
|
ScrStr *scr_os_user_shell(void) { return scr_str_new("", 0); }
|
|
@@ -1391,7 +1420,7 @@ ScrStr *scr_os_tmpdir(void) { return scr_str_new("/tmp", 4); }
|
|
|
1391
1420
|
ScrStr *scr_os_homedir(void) {
|
|
1392
1421
|
/* uv_os_homedir: $HOME when set (even empty is "set" only if non-NULL;
|
|
1393
1422
|
* libuv requires non-empty), else the passwd entry. */
|
|
1394
|
-
const char *home =
|
|
1423
|
+
const char *home = scr_getenv("HOME");
|
|
1395
1424
|
if (home && home[0] != '\0') return scr_str_new(home, strlen(home));
|
|
1396
1425
|
struct passwd pw;
|
|
1397
1426
|
struct passwd *result = NULL;
|
|
@@ -1468,9 +1497,9 @@ double scr_os_totalmem(void) {
|
|
|
1468
1497
|
ScrStr *scr_os_tmpdir(void) {
|
|
1469
1498
|
/* Node's env cascade, with ONE trailing slash trimmed (never down to
|
|
1470
1499
|
* nothing: "/" stays "/"). */
|
|
1471
|
-
const char *dir =
|
|
1472
|
-
if (!dir || dir[0] == '\0') dir =
|
|
1473
|
-
if (!dir || dir[0] == '\0') dir =
|
|
1500
|
+
const char *dir = scr_getenv("TMPDIR");
|
|
1501
|
+
if (!dir || dir[0] == '\0') dir = scr_getenv("TMP");
|
|
1502
|
+
if (!dir || dir[0] == '\0') dir = scr_getenv("TEMP");
|
|
1474
1503
|
if (!dir || dir[0] == '\0') dir = "/tmp";
|
|
1475
1504
|
size_t len = strlen(dir);
|
|
1476
1505
|
if (len > 1 && dir[len - 1] == '/') len--;
|
|
@@ -1743,8 +1772,8 @@ void scr_os_ifaddrs_free(ScrIfaddrs *s) {
|
|
|
1743
1772
|
|
|
1744
1773
|
/* The events-unit hooks (scr_events.c fills them at install; NULL in
|
|
1745
1774
|
* event-free binaries and in the standalone runtime C tests). */
|
|
1746
|
-
void (*scr_process_exit_hook)(double code) = NULL;
|
|
1747
|
-
void (*scr_stdin_destroy_hook)(void) = NULL;
|
|
1775
|
+
SCR_TL void (*scr_process_exit_hook)(double code) = NULL;
|
|
1776
|
+
SCR_TL void (*scr_stdin_destroy_hook)(void) = NULL;
|
|
1748
1777
|
|
|
1749
1778
|
void scr_process_set_exit_code(double code) {
|
|
1750
1779
|
if (!isfinite(code) || trunc(code) != code) {
|
|
@@ -1782,6 +1811,13 @@ void scr_process_exit(double code) {
|
|
|
1782
1811
|
* non-NULL only when the events unit is linked (scr_events.c). */
|
|
1783
1812
|
scr_process_in_exit = true;
|
|
1784
1813
|
if (scr_process_exit_hook != NULL) scr_process_exit_hook(code);
|
|
1814
|
+
#ifdef SCR_WORKERS
|
|
1815
|
+
if (!scr_context_is_main()) {
|
|
1816
|
+
/* A nested exit or a failing exit listener already selected its code. */
|
|
1817
|
+
if (!scr_context_stopping()) scr_context_stop((int)code);
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
#endif
|
|
1785
1821
|
/* _Exit skips atexit handlers on purpose: no further code runs (matching
|
|
1786
1822
|
* Node), and the RC audit is meaningless mid-program (live values are
|
|
1787
1823
|
* expected). scr_init's flush-at-exit is also skipped — flush here. */
|
|
@@ -1796,7 +1832,7 @@ void scr_process_exit(double code) {
|
|
|
1796
1832
|
* attribute monotonic stamp — the binary's own start, which is what
|
|
1797
1833
|
* "the current Node.js process" means for a compiled program). */
|
|
1798
1834
|
#ifdef _WIN32
|
|
1799
|
-
#if defined(SCR_LIB) && defined(SCR_THREAD_INSTANCES)
|
|
1835
|
+
#if (defined(SCR_LIB) && defined(SCR_THREAD_INSTANCES)) || defined(SCR_WORKERS)
|
|
1800
1836
|
/* The uptime anchor belongs to the host PROCESS, not to a library
|
|
1801
1837
|
* instance. InitOnce keeps the lazy Windows spelling race-free when
|
|
1802
1838
|
* several thread instances ask for the clock concurrently. */
|
|
@@ -1840,7 +1876,7 @@ __attribute__((constructor)) static void scr_uptime_anchor_init(void) {
|
|
|
1840
1876
|
#endif
|
|
1841
1877
|
|
|
1842
1878
|
double scr_process_uptime(void) {
|
|
1843
|
-
#if defined(_WIN32) && defined(SCR_LIB) && defined(SCR_THREAD_INSTANCES)
|
|
1879
|
+
#if defined(_WIN32) && ((defined(SCR_LIB) && defined(SCR_THREAD_INSTANCES)) || defined(SCR_WORKERS))
|
|
1844
1880
|
scr_uptime_anchor_init();
|
|
1845
1881
|
#elif defined(_WIN32)
|
|
1846
1882
|
if (scr_uptime_t0_ms == 0) scr_uptime_anchor_init();
|
|
@@ -1852,7 +1888,7 @@ double scr_process_uptime(void) {
|
|
|
1852
1888
|
* start (Node's timeOrigin anchor), fractional — the same monotonic
|
|
1853
1889
|
* clock and anchor as uptime, in Node's performance.now units. */
|
|
1854
1890
|
double scr_perf_now(void) {
|
|
1855
|
-
#if defined(_WIN32) && defined(SCR_LIB) && defined(SCR_THREAD_INSTANCES)
|
|
1891
|
+
#if defined(_WIN32) && ((defined(SCR_LIB) && defined(SCR_THREAD_INSTANCES)) || defined(SCR_WORKERS))
|
|
1856
1892
|
scr_uptime_anchor_init();
|
|
1857
1893
|
#elif defined(_WIN32)
|
|
1858
1894
|
if (scr_uptime_t0_ms == 0) scr_uptime_anchor_init();
|
|
@@ -2092,9 +2128,34 @@ SCR_TL bool scr_process_in_exit = false;
|
|
|
2092
2128
|
|
|
2093
2129
|
bool scr_process_exiting(void) { return scr_process_in_exit; }
|
|
2094
2130
|
|
|
2131
|
+
#ifdef SCR_WORKERS
|
|
2132
|
+
/* Initialize before workers start. Reading through the cached process value
|
|
2133
|
+
* avoids temporarily clearing the OS mask while another thread creates a file. */
|
|
2134
|
+
static void scr_process_mask_init(void) {
|
|
2135
|
+
#ifdef _WIN32
|
|
2136
|
+
int current, ignored;
|
|
2137
|
+
_umask_s(0, ¤t);
|
|
2138
|
+
_umask_s(current, &ignored);
|
|
2139
|
+
#else
|
|
2140
|
+
unsigned current = umask(0);
|
|
2141
|
+
umask((mode_t)current);
|
|
2142
|
+
#endif
|
|
2143
|
+
atomic_store_explicit(&scr_process_mask, (unsigned)current, memory_order_relaxed);
|
|
2144
|
+
}
|
|
2145
|
+
#endif
|
|
2146
|
+
|
|
2095
2147
|
/* umask(2): mask < 0 reads without setting (set 0, restore — umask has no
|
|
2096
2148
|
* read-only form); otherwise sets and answers the previous mask. */
|
|
2097
2149
|
double scr_process_umask(double mask) {
|
|
2150
|
+
#ifdef SCR_WORKERS
|
|
2151
|
+
if (mask < 0) return atomic_load_explicit(&scr_process_mask, memory_order_relaxed);
|
|
2152
|
+
if (!scr_context_is_main()) {
|
|
2153
|
+
static const char message[] = "Setting process.umask() is not supported in workers";
|
|
2154
|
+
scr_throw_error_msg_code(SCR_ERR_ERROR, message, sizeof message - 1, "ERR_WORKER_UNSUPPORTED_OPERATION");
|
|
2155
|
+
return 0;
|
|
2156
|
+
}
|
|
2157
|
+
atomic_store_explicit(&scr_process_mask, (unsigned)mask, memory_order_relaxed);
|
|
2158
|
+
#endif
|
|
2098
2159
|
#ifdef _WIN32
|
|
2099
2160
|
/* Node on Windows accepts umask() calls; only the low bits matter. */
|
|
2100
2161
|
int prev;
|
|
@@ -2124,6 +2185,13 @@ double scr_process_umask(double mask) {
|
|
|
2124
2185
|
}
|
|
2125
2186
|
|
|
2126
2187
|
void scr_process_chdir(ScrStr *dir) {
|
|
2188
|
+
#ifdef SCR_WORKERS
|
|
2189
|
+
if (!scr_context_is_main()) {
|
|
2190
|
+
static const char message[] = "process.chdir() is not supported in workers";
|
|
2191
|
+
scr_throw_error_msg_code(SCR_ERR_TYPE, message, sizeof message - 1, "ERR_WORKER_UNSUPPORTED_OPERATION");
|
|
2192
|
+
return;
|
|
2193
|
+
}
|
|
2194
|
+
#endif
|
|
2127
2195
|
#ifdef _WIN32
|
|
2128
2196
|
WCHAR *wide = scr_fs_win_wide(dir);
|
|
2129
2197
|
BOOL changed = wide && SetCurrentDirectoryW(wide);
|
|
@@ -2299,34 +2367,125 @@ static FILE *scr_fs_fopen(const ScrStr *path, const char *mode) {
|
|
|
2299
2367
|
#endif
|
|
2300
2368
|
}
|
|
2301
2369
|
|
|
2370
|
+
/* File sizes are hints, never EOF. Pseudo-files, pipes and concurrently
|
|
2371
|
+
* changing files still read to EOF; descriptor reads keep their position
|
|
2372
|
+
* and ownership. Limit individual reads for the CRT and small ssize_t. */
|
|
2373
|
+
typedef struct {
|
|
2374
|
+
ScrStr *text;
|
|
2375
|
+
uint8_t *bytes;
|
|
2376
|
+
size_t len, cap;
|
|
2377
|
+
} ScrFileRead;
|
|
2378
|
+
|
|
2379
|
+
static size_t scr_file_read_hint(FILE *stream, int fd) {
|
|
2380
|
+
if (stream) fd = fileno(stream);
|
|
2381
|
+
#ifdef _WIN32
|
|
2382
|
+
struct _stat64 st;
|
|
2383
|
+
if (_fstat64(fd, &st) != 0 || !S_ISREG(st.st_mode) || st.st_size <= 0) return 4096;
|
|
2384
|
+
int64_t position = stream ? 0 : _lseeki64(fd, 0, SEEK_CUR);
|
|
2385
|
+
#else
|
|
2386
|
+
struct stat st;
|
|
2387
|
+
if (fstat(fd, &st) != 0 || !S_ISREG(st.st_mode) || st.st_size <= 0) return 4096;
|
|
2388
|
+
off_t position = stream ? 0 : lseek(fd, 0, SEEK_CUR);
|
|
2389
|
+
#endif
|
|
2390
|
+
if (position < 0 || position >= st.st_size) return 4096;
|
|
2391
|
+
uintmax_t remaining = (uintmax_t)st.st_size - (uintmax_t)position;
|
|
2392
|
+
/* A bounded initial allocation also tolerates sparse files that shrink
|
|
2393
|
+
* between metadata and the first read without reserving their full size. */
|
|
2394
|
+
size_t limit = 64 * 1024 * 1024;
|
|
2395
|
+
return remaining > limit ? limit : (size_t)remaining;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
static uint8_t *scr_file_read_data(ScrFileRead *out) {
|
|
2399
|
+
return out->text ? (uint8_t *)out->text->data : out->bytes;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
static void scr_file_read_grow(ScrFileRead *out) {
|
|
2403
|
+
size_t limit = SIZE_MAX - sizeof(ScrStr) - 1;
|
|
2404
|
+
if (out->cap >= limit) scr_trap("scriptc: file too large\n");
|
|
2405
|
+
size_t cap = out->cap > limit / 2 ? limit : out->cap * 2;
|
|
2406
|
+
if (out->text) {
|
|
2407
|
+
out->text->len = out->len;
|
|
2408
|
+
out->text = scr_str_regrow(out->text, cap);
|
|
2409
|
+
} else {
|
|
2410
|
+
uint8_t *grown = realloc(out->bytes, cap);
|
|
2411
|
+
if (!grown) scr_trap("scriptc: out of memory\n");
|
|
2412
|
+
out->bytes = grown;
|
|
2413
|
+
}
|
|
2414
|
+
out->cap = cap;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
/* Fill the final allocation. At a full capacity, probe one byte before
|
|
2418
|
+
* growing so an exact-size regular file never doubles its retained space. */
|
|
2419
|
+
static int scr_file_read_all(FILE *stream, int fd, bool text, ScrFileRead *out) {
|
|
2420
|
+
*out = (ScrFileRead){0};
|
|
2421
|
+
out->cap = scr_file_read_hint(stream, fd);
|
|
2422
|
+
if (text) {
|
|
2423
|
+
out->text = scr_str_alloc_raw(0, out->cap);
|
|
2424
|
+
out->cap = out->text->cap;
|
|
2425
|
+
out->text->data[0] = '\0';
|
|
2426
|
+
} else {
|
|
2427
|
+
out->bytes = malloc(out->cap);
|
|
2428
|
+
if (!out->bytes) scr_trap("scriptc: out of memory\n");
|
|
2429
|
+
}
|
|
2430
|
+
for (;;) {
|
|
2431
|
+
uint8_t extra;
|
|
2432
|
+
bool full = out->len == out->cap;
|
|
2433
|
+
size_t room = full ? 1 : out->cap - out->len;
|
|
2434
|
+
if (room > 512 * 1024) room = 512 * 1024;
|
|
2435
|
+
uint8_t *dest = full ? &extra : scr_file_read_data(out) + out->len;
|
|
2436
|
+
size_t count;
|
|
2437
|
+
int error = 0;
|
|
2438
|
+
if (stream) {
|
|
2439
|
+
count = fread(dest, 1, room, stream);
|
|
2440
|
+
if (ferror(stream)) error = errno ? errno : EIO;
|
|
2441
|
+
} else {
|
|
2442
|
+
ssize_t n = read(fd, dest, room);
|
|
2443
|
+
if (n < 0) { count = 0; error = errno; }
|
|
2444
|
+
else count = (size_t)n;
|
|
2445
|
+
}
|
|
2446
|
+
if (count) {
|
|
2447
|
+
if (full) {
|
|
2448
|
+
scr_file_read_grow(out);
|
|
2449
|
+
scr_file_read_data(out)[out->len] = extra;
|
|
2450
|
+
}
|
|
2451
|
+
out->len += count;
|
|
2452
|
+
}
|
|
2453
|
+
if (error == EINTR) {
|
|
2454
|
+
if (stream) clearerr(stream);
|
|
2455
|
+
continue;
|
|
2456
|
+
}
|
|
2457
|
+
if (error) {
|
|
2458
|
+
/* Raw strings must be safe for the normal cache-aware destructor. */
|
|
2459
|
+
if (out->text) { out->text->len = out->len; out->text->data[out->len] = '\0'; }
|
|
2460
|
+
scr_str_release(out->text);
|
|
2461
|
+
free(out->bytes);
|
|
2462
|
+
*out = (ScrFileRead){0};
|
|
2463
|
+
return error;
|
|
2464
|
+
}
|
|
2465
|
+
if (!count) break;
|
|
2466
|
+
}
|
|
2467
|
+
if (out->text) { out->text->len = out->len; out->text->data[out->len] = '\0'; }
|
|
2468
|
+
// Do not retain a large hint after truncation or a tiny pipe result.
|
|
2469
|
+
if (out->cap > 256 && out->len < out->cap / 2) {
|
|
2470
|
+
if (out->text) out->text = scr_str_regrow(out->text, out->len);
|
|
2471
|
+
else {
|
|
2472
|
+
uint8_t *trimmed = realloc(out->bytes, out->len ? out->len : 1);
|
|
2473
|
+
if (trimmed) out->bytes = trimmed;
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
return 0;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2302
2479
|
static ScrStr *scr_fs_read_file_core(ScrStr *path, bool env_file) {
|
|
2303
2480
|
FILE *f = scr_fs_fopen(path, "rb");
|
|
2304
2481
|
if (!f) {
|
|
2305
2482
|
scr_fs_throw(errno, "open", path);
|
|
2306
2483
|
return NULL;
|
|
2307
2484
|
}
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
}
|
|
2313
|
-
for (;;) {
|
|
2314
|
-
if (cap - len < 2048) {
|
|
2315
|
-
cap *= 2;
|
|
2316
|
-
char *grown = realloc(buf, cap);
|
|
2317
|
-
if (!grown) {
|
|
2318
|
-
scr_trap("scriptc: out of memory\n");
|
|
2319
|
-
}
|
|
2320
|
-
buf = grown;
|
|
2321
|
-
}
|
|
2322
|
-
size_t n = fread(buf + len, 1, cap - len, f);
|
|
2323
|
-
len += n;
|
|
2324
|
-
if (n == 0) break;
|
|
2325
|
-
}
|
|
2326
|
-
if (ferror(f)) {
|
|
2327
|
-
int e = errno;
|
|
2328
|
-
fclose(f);
|
|
2329
|
-
free(buf);
|
|
2485
|
+
ScrFileRead out;
|
|
2486
|
+
int error = scr_file_read_all(f, -1, true, &out);
|
|
2487
|
+
fclose(f);
|
|
2488
|
+
if (error) {
|
|
2330
2489
|
if (env_file) {
|
|
2331
2490
|
ScrJsonBuf b;
|
|
2332
2491
|
scr_jb_init(&b);
|
|
@@ -2336,13 +2495,20 @@ static ScrStr *scr_fs_read_file_core(ScrStr *path, bool env_file) {
|
|
|
2336
2495
|
ScrStr *message = scr_jb_finish(&b);
|
|
2337
2496
|
scr_throw_error_msg_code(SCR_ERR_TYPE, message->data, message->len, "ERR_INVALID_ARG_TYPE");
|
|
2338
2497
|
scr_str_release(message);
|
|
2339
|
-
} else scr_fs_throw(
|
|
2498
|
+
} else scr_fs_throw(error, "read", path);
|
|
2340
2499
|
return NULL;
|
|
2341
2500
|
}
|
|
2501
|
+
return out.text;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
ScrBytes *scr_fs_read_file_bytes(ScrStr *path) {
|
|
2505
|
+
FILE *f = scr_fs_fopen(path, "rb");
|
|
2506
|
+
if (!f) { scr_fs_throw(errno, "open", path); return NULL; }
|
|
2507
|
+
ScrFileRead out;
|
|
2508
|
+
int error = scr_file_read_all(f, -1, false, &out);
|
|
2342
2509
|
fclose(f);
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
return s;
|
|
2510
|
+
if (error) { scr_fs_throw(error, "read", path); return NULL; }
|
|
2511
|
+
return scr_bytes_take_data(out.bytes, out.len);
|
|
2346
2512
|
}
|
|
2347
2513
|
|
|
2348
2514
|
ScrStr *scr_fs_read_file(ScrStr *path) {
|
|
@@ -3043,6 +3209,7 @@ static double scr_fs_write_bytes(double fd, const void *data, size_t length,
|
|
|
3043
3209
|
* Node/libuv. Positioned writes do not advance the descriptor. */
|
|
3044
3210
|
double scr_fs_write_sync(double fd, ScrBytes *buf, double offset, double length,
|
|
3045
3211
|
double position) {
|
|
3212
|
+
SCR_BYTES_SNAPSHOT(buf);
|
|
3046
3213
|
size_t bytelen = buf->len; /* frontend admits u8 buffers only */
|
|
3047
3214
|
char msg[160];
|
|
3048
3215
|
char recv[48];
|
|
@@ -3173,9 +3340,18 @@ double scr_fs_read_sync(double fd, ScrBytes *buf, double offset, double length,
|
|
|
3173
3340
|
scr_throw_error_msg_code(SCR_ERR_RANGE, msg, (size_t)mlen, "ERR_OUT_OF_RANGE");
|
|
3174
3341
|
return 0;
|
|
3175
3342
|
}
|
|
3343
|
+
uint8_t *bounce = buf->shared ? malloc(want ? want : 1) : NULL;
|
|
3344
|
+
if (buf->shared && !bounce) scr_trap("scriptc: out of memory\n");
|
|
3345
|
+
uint8_t *destination = bounce ? bounce : buf->data + off;
|
|
3176
3346
|
ssize_t n = position == -1
|
|
3177
|
-
? read((int)fd,
|
|
3178
|
-
: scr_fs_pread((int)fd,
|
|
3347
|
+
? read((int)fd, destination, want)
|
|
3348
|
+
: scr_fs_pread((int)fd, destination, want, position);
|
|
3349
|
+
int read_error = errno;
|
|
3350
|
+
if (bounce) {
|
|
3351
|
+
if (n > 0) scr_bytes_write(buf, off, bounce, (size_t)n);
|
|
3352
|
+
free(bounce);
|
|
3353
|
+
}
|
|
3354
|
+
errno = read_error;
|
|
3179
3355
|
if (n < 0) {
|
|
3180
3356
|
int e = errno;
|
|
3181
3357
|
char namebuf[16];
|
|
@@ -3221,7 +3397,7 @@ static double scr_fs_vector_sync(double fd, ScrArr *buffers, double position,
|
|
|
3221
3397
|
size_t at = 0;
|
|
3222
3398
|
for (size_t i = 0; i < count; i++) {
|
|
3223
3399
|
ScrBytes *buf = scr_arr_get_ref(buffers, (double)i);
|
|
3224
|
-
|
|
3400
|
+
scr_bytes_read(buf, 0, data + at, buf->len);
|
|
3225
3401
|
at += buf->len;
|
|
3226
3402
|
scr_bytes_release(buf);
|
|
3227
3403
|
}
|
|
@@ -3238,7 +3414,7 @@ static double scr_fs_vector_sync(double fd, ScrArr *buffers, double position,
|
|
|
3238
3414
|
for (size_t i = 0; i < count && remaining; i++) {
|
|
3239
3415
|
ScrBytes *buf = scr_arr_get_ref(buffers, (double)i);
|
|
3240
3416
|
size_t n = buf->len < remaining ? buf->len : remaining;
|
|
3241
|
-
|
|
3417
|
+
scr_bytes_write(buf, 0, data + at, n);
|
|
3242
3418
|
at += n;
|
|
3243
3419
|
remaining -= n;
|
|
3244
3420
|
scr_bytes_release(buf);
|
|
@@ -3799,94 +3975,18 @@ static void scr_fs_throw_nopath(int e, const char *op) {
|
|
|
3799
3975
|
scr_throw_error_msg_code(SCR_ERR_ERROR, msg, (size_t)len, name);
|
|
3800
3976
|
}
|
|
3801
3977
|
|
|
3802
|
-
/* read(2) loop to EOF from the CURRENT position — Node's
|
|
3803
|
-
* readFileSync(fd) semantics for pipes and files alike (the stdin
|
|
3804
|
-
* pattern: readFileSync(0, "utf8")). Returns the malloc'd buffer and
|
|
3805
|
-
* its length, or NULL with the exception pending. */
|
|
3806
|
-
static char *scr_read_fd_all(double fd, size_t *out_len) {
|
|
3807
|
-
size_t cap = 4096, len = 0;
|
|
3808
|
-
char *buf = malloc(cap);
|
|
3809
|
-
if (!buf) {
|
|
3810
|
-
scr_trap("scriptc: out of memory\n");
|
|
3811
|
-
}
|
|
3812
|
-
for (;;) {
|
|
3813
|
-
if (cap - len < 2048) {
|
|
3814
|
-
cap *= 2;
|
|
3815
|
-
char *grown = realloc(buf, cap);
|
|
3816
|
-
if (!grown) {
|
|
3817
|
-
scr_trap("scriptc: out of memory\n");
|
|
3818
|
-
}
|
|
3819
|
-
buf = grown;
|
|
3820
|
-
}
|
|
3821
|
-
ssize_t n = read((int)fd, buf + len, cap - len);
|
|
3822
|
-
if (n < 0) {
|
|
3823
|
-
if (errno == EINTR) continue;
|
|
3824
|
-
int e = errno;
|
|
3825
|
-
free(buf);
|
|
3826
|
-
scr_fs_throw_nopath(e, "read");
|
|
3827
|
-
return NULL;
|
|
3828
|
-
}
|
|
3829
|
-
if (n == 0) break;
|
|
3830
|
-
len += (size_t)n;
|
|
3831
|
-
}
|
|
3832
|
-
*out_len = len;
|
|
3833
|
-
return buf;
|
|
3834
|
-
}
|
|
3835
|
-
|
|
3836
3978
|
ScrStr *scr_fs_read_fd(double fd) {
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
if (
|
|
3840
|
-
|
|
3841
|
-
free(buf);
|
|
3842
|
-
return s;
|
|
3979
|
+
ScrFileRead out;
|
|
3980
|
+
int error = scr_file_read_all(NULL, (int)fd, true, &out);
|
|
3981
|
+
if (error) { scr_fs_throw_nopath(error, "read"); return NULL; }
|
|
3982
|
+
return out.text;
|
|
3843
3983
|
}
|
|
3844
3984
|
|
|
3845
3985
|
ScrBytes *scr_fs_read_fd_bytes(double fd) {
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
if (
|
|
3849
|
-
|
|
3850
|
-
if (len > 0) memcpy(b->data, buf, len);
|
|
3851
|
-
free(buf);
|
|
3852
|
-
return b;
|
|
3853
|
-
}
|
|
3854
|
-
|
|
3855
|
-
/* ── Atomics.wait: the synchronous-sleep idiom ───────────────────────
|
|
3856
|
-
* Atomics.wait(int32Array, idx, expected, timeoutMs). scriptc has no
|
|
3857
|
-
* threads: nothing can ever notify a waiter, so the spec's behavior for
|
|
3858
|
-
* every compilable program is exactly "compare, then sleep out the
|
|
3859
|
-
* timeout" — "not-equal" immediately when the element differs from
|
|
3860
|
-
* `expected`, "timed-out" after a real nanosleep otherwise ("ok" is
|
|
3861
|
-
* unreachable; the compiler requires the timeout argument, since an
|
|
3862
|
-
* infinite wait here would be a certain deadlock). The sleep resumes
|
|
3863
|
-
* across EINTR so signals don't shorten it. Timeout semantics follow the
|
|
3864
|
-
* spec: NaN/+Infinity would be infinite (compiler-fenced by requiring
|
|
3865
|
-
* the argument, but a runtime NaN clamps to 0 defensively), negatives
|
|
3866
|
-
* clamp to 0. */
|
|
3867
|
-
ScrStr *scr_atomics_wait(ScrBytes *arr, double idx, double expected, double timeout_ms) {
|
|
3868
|
-
double have = scr_bytes_get(arr, idx); /* traps out-of-range like every access */
|
|
3869
|
-
/* The comparison is on the stored int32 vs ToInt32(expected). */
|
|
3870
|
-
double t = expected;
|
|
3871
|
-
if (t != t || isinf(t)) t = 0;
|
|
3872
|
-
else {
|
|
3873
|
-
t = trunc(t);
|
|
3874
|
-
t = fmod(t, 4294967296.0);
|
|
3875
|
-
if (t < 0) t += 4294967296.0;
|
|
3876
|
-
if (t >= 2147483648.0) t -= 4294967296.0;
|
|
3877
|
-
}
|
|
3878
|
-
if (have != t) return scr_str_new("not-equal", 9);
|
|
3879
|
-
double ms = timeout_ms;
|
|
3880
|
-
if (ms != ms || ms < 0) ms = 0;
|
|
3881
|
-
if (ms > 0) {
|
|
3882
|
-
struct timespec left = {
|
|
3883
|
-
(time_t)(ms / 1000.0),
|
|
3884
|
-
(long)((ms - (double)(time_t)(ms / 1000.0) * 1000.0) * 1e6),
|
|
3885
|
-
};
|
|
3886
|
-
struct timespec rem;
|
|
3887
|
-
while (nanosleep(&left, &rem) != 0 && errno == EINTR) left = rem;
|
|
3888
|
-
}
|
|
3889
|
-
return scr_str_new("timed-out", 9);
|
|
3986
|
+
ScrFileRead out;
|
|
3987
|
+
int error = scr_file_read_all(NULL, (int)fd, false, &out);
|
|
3988
|
+
if (error) { scr_fs_throw_nopath(error, "read"); return NULL; }
|
|
3989
|
+
return scr_bytes_take_data(out.bytes, out.len);
|
|
3890
3990
|
}
|
|
3891
3991
|
|
|
3892
3992
|
/* ── the tty probes ──────────────────────────────────────────────────── */
|
|
@@ -4408,7 +4508,7 @@ static DWORD scr_fs_win_junction(const WCHAR *target, const WCHAR *destination)
|
|
|
4408
4508
|
|
|
4409
4509
|
#ifdef _WIN32
|
|
4410
4510
|
/* libuv keeps this fallback for later calls once Windows rejects the flag. */
|
|
4411
|
-
static DWORD scr_fs_symlink_usermode_flag = 0x2; /* ALLOW_UNPRIVILEGED_CREATE */
|
|
4511
|
+
static SCR_TL DWORD scr_fs_symlink_usermode_flag = 0x2; /* ALLOW_UNPRIVILEGED_CREATE */
|
|
4412
4512
|
#endif
|
|
4413
4513
|
|
|
4414
4514
|
int scr_fs_symlink_infer(ScrStr *absolute) {
|
|
@@ -5679,6 +5779,7 @@ ScrCryptoHash *scr_crypto_hmac_new_str(ScrStr *alg, ScrStr *key) {
|
|
|
5679
5779
|
}
|
|
5680
5780
|
|
|
5681
5781
|
ScrCryptoHash *scr_crypto_hmac_new_bytes(ScrStr *alg, ScrBytes *key) {
|
|
5782
|
+
SCR_BYTES_SNAPSHOT(key);
|
|
5682
5783
|
ScrDigestAlg kind;
|
|
5683
5784
|
if (!scr_digest_alg(alg->data, alg->len, &kind)) {
|
|
5684
5785
|
scr_crypto_invalid_digest(alg);
|
|
@@ -5719,6 +5820,7 @@ ScrCryptoHash *scr_crypto_hash_update_str(ScrCryptoHash *hash, ScrStr *data) {
|
|
|
5719
5820
|
}
|
|
5720
5821
|
|
|
5721
5822
|
ScrCryptoHash *scr_crypto_hash_update_bytes(ScrCryptoHash *hash, ScrBytes *data) {
|
|
5823
|
+
SCR_BYTES_SNAPSHOT(data);
|
|
5722
5824
|
return scr_crypto_hash_update_raw(hash, data->data,
|
|
5723
5825
|
data->len * scr_bytes_elem_size(data->elem));
|
|
5724
5826
|
}
|
|
@@ -5790,10 +5892,12 @@ ScrStr *scr_crypto_hash_digest_str(ScrStr *alg, ScrStr *data, ScrStr *enc) {
|
|
|
5790
5892
|
}
|
|
5791
5893
|
|
|
5792
5894
|
ScrStr *scr_crypto_hash_digest_bytes(ScrStr *alg, ScrBytes *data, ScrStr *enc) {
|
|
5895
|
+
SCR_BYTES_SNAPSHOT(data);
|
|
5793
5896
|
return scr_hash_digest_raw(alg, data->data, data->len * scr_bytes_elem_size(data->elem), enc);
|
|
5794
5897
|
}
|
|
5795
5898
|
|
|
5796
5899
|
bool scr_crypto_timing_safe_equal(ScrBytes *left, ScrBytes *right) {
|
|
5900
|
+
SCR_SHARED_GUARD(left, right);
|
|
5797
5901
|
size_t left_len = left->len * scr_bytes_elem_size(left->elem);
|
|
5798
5902
|
size_t right_len = right->len * scr_bytes_elem_size(right->elem);
|
|
5799
5903
|
if (left_len != right_len) {
|
|
@@ -5838,7 +5942,13 @@ ScrBytes *scr_crypto_random_fill(ScrBytes *bytes, double offset, double size) {
|
|
|
5838
5942
|
scr_throw_error_msg_code(SCR_ERR_RANGE, msg, (size_t)n, "ERR_OUT_OF_RANGE");
|
|
5839
5943
|
return NULL;
|
|
5840
5944
|
}
|
|
5841
|
-
|
|
5945
|
+
if (bytes->shared) {
|
|
5946
|
+
uint8_t *random = malloc(size ? (size_t)size : 1);
|
|
5947
|
+
if (!random) scr_trap("scriptc: out of memory\n");
|
|
5948
|
+
arc4random_buf(random, (size_t)size);
|
|
5949
|
+
scr_bytes_write(bytes, (size_t)offset, random, (size_t)size);
|
|
5950
|
+
free(random);
|
|
5951
|
+
} else arc4random_buf(bytes->data + (size_t)offset, (size_t)size);
|
|
5842
5952
|
return scr_bytes_retain(bytes);
|
|
5843
5953
|
}
|
|
5844
5954
|
|
|
@@ -5932,6 +6042,8 @@ static ScrBytes *scr_crypto_pbkdf2_raw(const unsigned char *password, size_t pas
|
|
|
5932
6042
|
|
|
5933
6043
|
ScrBytes *scr_crypto_pbkdf2(ScrBytes *password, ScrBytes *salt,
|
|
5934
6044
|
double iterations, double keylen, ScrStr *digest) {
|
|
6045
|
+
SCR_BYTES_SNAPSHOT(password);
|
|
6046
|
+
SCR_BYTES_SNAPSHOT(salt);
|
|
5935
6047
|
if (!isfinite(iterations) || floor(iterations) != iterations ||
|
|
5936
6048
|
iterations < 1 || iterations > 2147483647.0) {
|
|
5937
6049
|
char value[64], msg[176];
|
|
@@ -5992,6 +6104,9 @@ static bool scr_crypto_integer(double value, const char *name, double max) {
|
|
|
5992
6104
|
|
|
5993
6105
|
ScrBytes *scr_crypto_hkdf_bytes(ScrStr *digest, ScrBytes *ikm, ScrBytes *salt,
|
|
5994
6106
|
ScrBytes *info, double keylen) {
|
|
6107
|
+
SCR_BYTES_SNAPSHOT(ikm);
|
|
6108
|
+
SCR_BYTES_SNAPSHOT(salt);
|
|
6109
|
+
SCR_BYTES_SNAPSHOT(info);
|
|
5995
6110
|
if (!scr_crypto_integer(keylen, "length", 9007199254740991.0)) return NULL;
|
|
5996
6111
|
size_t info_len = info->len * scr_bytes_elem_size(info->elem);
|
|
5997
6112
|
if (info_len > 1024) {
|
|
@@ -6116,6 +6231,8 @@ static bool scr_scrypt_params(double n, double r, double p, double maxmem, size_
|
|
|
6116
6231
|
|
|
6117
6232
|
ScrBytes *scr_crypto_scrypt_derive(ScrBytes *password, ScrBytes *salt, double keylen,
|
|
6118
6233
|
double n, double r, double p, double maxmem) {
|
|
6234
|
+
SCR_BYTES_SNAPSHOT(password);
|
|
6235
|
+
SCR_BYTES_SNAPSHOT(salt);
|
|
6119
6236
|
if (!scr_crypto_integer(keylen, "keylen", 2147483647.0) ||
|
|
6120
6237
|
!scr_crypto_integer(n, "N", 4294967295.0) || !scr_crypto_integer(r, "r", 4294967295.0) ||
|
|
6121
6238
|
!scr_crypto_integer(p, "p", 4294967295.0) || !scr_crypto_integer(maxmem, "maxmem", 9007199254740991.0)) return NULL;
|
|
@@ -6246,6 +6363,7 @@ ScrBytes *scr_crypto_scrypt(ScrBytes *password, ScrBytes *salt, double keylen, S
|
|
|
6246
6363
|
static ScrStr *scr_x509_fingerprint_raw(const uint8_t *in, size_t n);
|
|
6247
6364
|
|
|
6248
6365
|
ScrStr *scr_crypto_x509_fingerprint(ScrBytes *data) {
|
|
6366
|
+
SCR_BYTES_SNAPSHOT(data);
|
|
6249
6367
|
return scr_x509_fingerprint_raw(data->data, data->len * scr_bytes_elem_size(data->elem));
|
|
6250
6368
|
}
|
|
6251
6369
|
|
|
@@ -6472,6 +6590,7 @@ static ScrStr *scr_x509_validity_raw(const uint8_t *in, size_t n, bool want_to)
|
|
|
6472
6590
|
}
|
|
6473
6591
|
|
|
6474
6592
|
ScrStr *scr_crypto_x509_valid_from(ScrBytes *data) {
|
|
6593
|
+
SCR_BYTES_SNAPSHOT(data);
|
|
6475
6594
|
return scr_x509_validity_raw(data->data, data->len * scr_bytes_elem_size(data->elem), false);
|
|
6476
6595
|
}
|
|
6477
6596
|
|
|
@@ -6480,6 +6599,7 @@ ScrStr *scr_crypto_x509_valid_from_str(ScrStr *pem) {
|
|
|
6480
6599
|
}
|
|
6481
6600
|
|
|
6482
6601
|
ScrStr *scr_crypto_x509_valid_to(ScrBytes *data) {
|
|
6602
|
+
SCR_BYTES_SNAPSHOT(data);
|
|
6483
6603
|
return scr_x509_validity_raw(data->data, data->len * scr_bytes_elem_size(data->elem), true);
|
|
6484
6604
|
}
|
|
6485
6605
|
|