node-ctypes 1.2.0 → 1.3.0
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 +125 -10
- package/build/Release/ctypes-darwin-arm64.node +0 -0
- package/build/Release/ctypes-darwin-x64.node +0 -0
- package/build/Release/ctypes-linux-arm64.node +0 -0
- package/build/Release/ctypes-linux-x64.node +0 -0
- package/build/Release/ctypes-win32-arm64.node +0 -0
- package/build/Release/ctypes-win32-x64.node +0 -0
- package/lib/core/Library.js +222 -214
- package/lib/core/types.js +7 -0
- package/lib/index.d.ts +23 -1
- package/lib/index.js +56 -59
- package/lib/memory/pointer.js +243 -25
- package/lib/structures/Structure.js +261 -230
- package/lib/structures/Union.js +10 -2
- package/lib/structures/helpers/common.js +9 -1
- package/lib/structures/helpers/struct.js +6 -1
- package/lib/structures/helpers/union.js +9 -19
- package/lib/types/primitives.js +1 -1
- package/package.json +1 -1
package/lib/types/primitives.js
CHANGED
|
@@ -199,7 +199,7 @@ export function createPrimitiveTypes(SimpleCData, native, addressOf, cstring, ws
|
|
|
199
199
|
|
|
200
200
|
class c_char extends SimpleCData {
|
|
201
201
|
static _size = 1;
|
|
202
|
-
static _type = CType.INT8;
|
|
202
|
+
static _type = CType.INT8; // char is int8 in C
|
|
203
203
|
static _reader = (buf, off) => buf.readInt8(off);
|
|
204
204
|
static _writer = (buf, off, val) => {
|
|
205
205
|
if (typeof val === "string") val = val.charCodeAt(0);
|