diff options
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r-- | ext/ffi/00_ffi.js | 9 |
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; |