summaryrefslogtreecommitdiff
path: root/ext/ffi/00_ffi.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-01-17 01:17:18 +0900
committerGitHub <noreply@github.com>2023-01-16 17:17:18 +0100
commit6da958d7ec31f2ffd21bb2beb8cc193a62afc55c (patch)
tree348fb3669348653b3907068b9ddc00f2652bdbfa /ext/ffi/00_ffi.js
parent40134ffc99848c89e0ab88c03ca85b9122e2384b (diff)
chore: update dlint to v0.37.0 for GitHub Actions (#17295)
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes: * fix(prefer-primordials): Stop using array pattern assignments * fix(prefer-primordials): Stop using global intrinsics except for `SharedArrayBuffer` * feat(guard-for-in): Apply new guard-for-in rule
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r--ext/ffi/00_ffi.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js
index 359b10b45..ce2e72370 100644
--- a/ext/ffi/00_ffi.js
+++ b/ext/ffi/00_ffi.js
@@ -268,7 +268,10 @@
let size = 0;
let alignment = 1;
for (const field of new SafeArrayIterator(type.struct)) {
- const [fieldSize, fieldAlign] = getTypeSizeAndAlignment(field, cache);
+ const { 0: fieldSize, 1: fieldAlign } = getTypeSizeAndAlignment(
+ field,
+ cache,
+ );
alignment = MathMax(alignment, fieldAlign);
size = MathCeil(size / fieldAlign) * fieldAlign;
size += fieldSize;
@@ -319,7 +322,7 @@
"Invalid UnsafeCallback, cannot be nonblocking",
);
}
- const [rid, pointer] = ops.op_ffi_unsafe_callback_create(
+ const { 0: rid, 1: pointer } = ops.op_ffi_unsafe_callback_create(
definition,
callback,
);
@@ -362,7 +365,7 @@
symbols = {};
constructor(path, symbols) {
- [this.#rid, this.symbols] = ops.op_ffi_load({ path, symbols });
+ ({ 0: this.#rid, 1: this.symbols } = ops.op_ffi_load({ path, symbols }));
for (const symbol in symbols) {
if (!ObjectPrototypeHasOwnProperty(symbols, symbol)) {
continue;