Comparing version 2.3.12 to 2.3.13
@@ -7,2 +7,8 @@ # Changelog | ||
#### Koffi 2.3.13 | ||
**Main changes:** | ||
- Add `koffi.address()` to get the raw value of a wrapper pointer | ||
#### Koffi 2.3.12 | ||
@@ -9,0 +15,0 @@ |
@@ -136,1 +136,5 @@ # Data pointers | ||
Read the documentation for [disposable types](calls.md#heap-allocated-values) on the page about function calls. | ||
## Unwrap pointers | ||
You can use `koffi.address(ptr)` on a pointer to get the numeric value as a [BigInt object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt). |
{ | ||
"name": "koffi", | ||
"version": "2.3.12", | ||
"stable": "2.3.12", | ||
"version": "2.3.13", | ||
"stable": "2.3.13", | ||
"description": "Fast and simple C FFI (foreign function interface) for Node.js", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -104,4 +104,2 @@ // Copyright 2023 Niels Martignène <niels.martignene@protonmail.com> | ||
export function as(value: any, type: TypeSpec): IKoffiPointerCast; | ||
export function disposable(type: TypeSpec): IKoffiCType; | ||
@@ -118,2 +116,3 @@ export function disposable(name: string, type: TypeSpec): IKoffiCType; | ||
export function as(value: any, type: TypeSpec): IKoffiPointerCast; | ||
export function decode(value: any, type: TypeSpec): any; | ||
@@ -123,2 +122,3 @@ export function decode(value: any, type: TypeSpec, len: number): any; | ||
export function decode(value: any, offset: number, type: TypeSpec, len: number): any; | ||
export function address(value: any): bigint; | ||
@@ -125,0 +125,0 @@ export function sizeof(type: TypeSpec): number; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 21 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 21 instances in 1 package
17370520
6449