koffi 1.1.0-beta.7 → 1.1.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_linux_arm.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/{1.1.0-beta.7 → 1.1.0-beta.8}/koffi_win32_x64.tar.gz +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -231,11 +231,11 @@ Koffi exposes three functions to explore type information:
|
|
|
231
231
|
Fixed-size arrays are declared with `koffi.array(type, length)`. Just like in C, they cannot be passed
|
|
232
232
|
as functions parameters (they degenerate to pointers), or returned by value. You can however embed them in struct types.
|
|
233
233
|
|
|
234
|
-
Special rules apply for arrays of primitive integer and float types (
|
|
235
|
-
- When converting from JS to C, Koffi can take a normal Array (e.g. `[1, 2]`) or a TypedArray of the correct type (e.g. `Uint8Array` for an array of `
|
|
236
|
-
- When converting from C to JS (for return value or output parameters), Koffi will by default use a TypedArray. But you can change this behavior when you create the array type with the optional hint argument: `koffi.array('
|
|
234
|
+
Special rules apply for arrays of primitive integer and float types (uint32_t, double, etc...):
|
|
235
|
+
- When converting from JS to C, Koffi can take a normal Array (e.g. `[1, 2]`) or a TypedArray of the correct type (e.g. `Uint8Array` for an array of `uint8_t` numbers)
|
|
236
|
+
- When converting from C to JS (for return value or output parameters), Koffi will by default use a TypedArray. But you can change this behavior when you create the array type with the optional hint argument: `koffi.array('uint8_t', 64, 'array')`
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
See the example below:
|
|
239
239
|
|
|
240
240
|
```js
|
|
241
241
|
const koffi = require('koffi');
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|