koffi 2.5.4 → 2.5.5
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/CHANGELOG.md +6 -0
- package/build/{2.5.4 → 2.5.5}/koffi_darwin_arm64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_darwin_x64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_freebsd_arm64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_freebsd_ia32/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_freebsd_x64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_linux_arm32hf/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_linux_arm64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_linux_ia32/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_linux_riscv64hf64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_linux_x64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_openbsd_ia32/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_openbsd_x64/koffi.node +0 -0
- package/build/2.5.5/koffi_win32_arm64/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_win32_ia32/koffi.node +0 -0
- package/build/{2.5.4 → 2.5.5}/koffi_win32_x64/koffi.node +0 -0
- package/package.json +2 -2
- package/src/koffi/src/util.cc +8 -10
- package/build/2.5.4/koffi_win32_arm64/koffi.node +0 -0
- /package/build/{2.5.4 → 2.5.5}/koffi_win32_arm64/koffi.exp +0 -0
- /package/build/{2.5.4 → 2.5.5}/koffi_win32_arm64/koffi.lib +0 -0
- /package/build/{2.5.4 → 2.5.5}/koffi_win32_ia32/koffi.exp +0 -0
- /package/build/{2.5.4 → 2.5.5}/koffi_win32_ia32/koffi.lib +0 -0
- /package/build/{2.5.4 → 2.5.5}/koffi_win32_x64/koffi.exp +0 -0
- /package/build/{2.5.4 → 2.5.5}/koffi_win32_x64/koffi.lib +0 -0
package/CHANGELOG.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/koffi/src/util.cc
CHANGED
|
@@ -1065,26 +1065,24 @@ Napi::Value Decode(Napi::Env env, const uint8_t *ptr, const TypeInfo *type, cons
|
|
|
1065
1065
|
if (*len >= 0) {
|
|
1066
1066
|
type = MakeArrayType(instance, type, *len);
|
|
1067
1067
|
} else {
|
|
1068
|
-
if (!(type->flags & (int)TypeFlag::IsCharLike)) [[unlikely]] {
|
|
1069
|
-
ThrowError<Napi::TypeError>(env, "Only char-like types can find their length automatically", type->name);
|
|
1070
|
-
return env.Null();
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
1068
|
switch (type->primitive) {
|
|
1074
|
-
case PrimitiveKind::Int8:
|
|
1069
|
+
case PrimitiveKind::Int8:
|
|
1070
|
+
case PrimitiveKind::UInt8: {
|
|
1075
1071
|
Size count = strlen((const char *)ptr);
|
|
1076
1072
|
type = MakeArrayType(instance, type, count);
|
|
1077
1073
|
} break;
|
|
1078
|
-
case PrimitiveKind::Int16:
|
|
1074
|
+
case PrimitiveKind::Int16:
|
|
1075
|
+
case PrimitiveKind::UInt16: {
|
|
1079
1076
|
Size count = WideStringLength((const char16_t *)ptr, RG_SIZE_MAX);
|
|
1080
1077
|
type = MakeArrayType(instance, type, count);
|
|
1081
1078
|
} break;
|
|
1082
1079
|
|
|
1083
|
-
default: {
|
|
1080
|
+
default: {
|
|
1081
|
+
ThrowError<Napi::TypeError>(env, "Cannot determine null-terminated length for type %1", type->name);
|
|
1082
|
+
return env.Null();
|
|
1083
|
+
} break;
|
|
1084
1084
|
}
|
|
1085
|
-
|
|
1086
1085
|
}
|
|
1087
|
-
|
|
1088
1086
|
}
|
|
1089
1087
|
|
|
1090
1088
|
#define RETURN_INT(Type, NewCall) \
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|