diff options
author | Aapo Alasuutari <aapo.alasuutari@gmail.com> | 2022-09-05 06:26:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 08:56:52 +0530 |
commit | 16dbf4adc390c9fb7656372b42811c1929e755dd (patch) | |
tree | bff7c876c97e5eb56d2d08de0198fe7640ddb031 /ext/ffi/00_ffi.js | |
parent | 08a6af398fd92517193e20117f9971c272b1bb5f (diff) |
feat(ext/ffi): Support bool FFI type (#15754)
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r-- | ext/ffi/00_ffi.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index 6957b9418..c9d6d629c 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -45,6 +45,12 @@ this.pointer = pointer; } + getBool(offset = 0) { + return ops.op_ffi_read_bool( + offset ? BigInt(this.pointer) + BigInt(offset) : this.pointer, + ); + } + getUint8(offset = 0) { return ops.op_ffi_read_u8( offset ? BigInt(this.pointer) + BigInt(offset) : this.pointer, |