0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

fix(ext/ffi): Use PointerValue in UnsafePointerView and UnsafeFnPointer types (#16354)

There were still remaining bigint usages for pointers. This now finally
fixes all of them, there is only the one `type PointerValue = number |
bigint;` line that references `bigint` in the unstable type definition
file.
This commit is contained in:
Aapo Alasuutari 2022-10-21 14:54:01 +03:00 committed by GitHub
parent 16a6b86122
commit 659a918f39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -696,9 +696,9 @@ declare namespace Deno {
* @category FFI
*/
export class UnsafePointerView {
constructor(pointer: bigint);
constructor(pointer: PointerValue);
pointer: bigint;
pointer: PointerValue;
/** Gets a boolean at the specified byte offset from the pointer. */
getBool(offset?: number): boolean;
@ -752,10 +752,10 @@ declare namespace Deno {
* @category FFI
*/
export class UnsafeFnPointer<Fn extends ForeignFunction> {
pointer: bigint;
pointer: PointerValue;
definition: Fn;
constructor(pointer: bigint, definition: Fn);
constructor(pointer: PointerValue, definition: Fn);
call: FromForeignFunction<Fn>;
}
@ -806,7 +806,7 @@ declare namespace Deno {
>,
);
pointer: bigint;
pointer: PointerValue;
definition: Definition;
callback: UnsafeCallbackFunction<
Definition["parameters"],