koffi 1.1.0-beta.2 → 1.1.0-beta.3
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/build/qemu/1.1.0-beta.3/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_linux_arm.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.3/koffi_win32_x64.tar.gz +0 -0
- package/package.json +1 -1
- package/src/ffi.cc +3 -2
- package/src/parser.cc +4 -3
- package/build/qemu/1.1.0-beta.2/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_linux_arm.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/1.1.0-beta.2/koffi_win32_x64.tar.gz +0 -0
|
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/ffi.cc
CHANGED
|
@@ -539,8 +539,9 @@ static bool ParseClassicFunction(Napi::Env env, Napi::String name, Napi::Value r
|
|
|
539
539
|
param.type = ResolveType(instance, parameters[j], ¶m.directions);
|
|
540
540
|
if (!param.type)
|
|
541
541
|
return false;
|
|
542
|
-
if (param.type->primitive == PrimitiveKind::Void
|
|
543
|
-
|
|
542
|
+
if (param.type->primitive == PrimitiveKind::Void ||
|
|
543
|
+
param.type->primitive == PrimitiveKind::Array) {
|
|
544
|
+
ThrowError<Napi::TypeError>(env, "Type %1 cannot be used as a parameter", param.type->name);
|
|
544
545
|
return false;
|
|
545
546
|
}
|
|
546
547
|
|
package/src/parser.cc
CHANGED
|
@@ -36,7 +36,7 @@ bool PrototypeParser::Parse(Napi::String proto, FunctionInfo *func)
|
|
|
36
36
|
|
|
37
37
|
func->ret.type = ParseType();
|
|
38
38
|
if (func->ret.type->primitive == PrimitiveKind::Array) {
|
|
39
|
-
MarkError("You are not allowed to directly return
|
|
39
|
+
MarkError("You are not allowed to directly return C arrays");
|
|
40
40
|
return false;
|
|
41
41
|
}
|
|
42
42
|
if (Match("__cdecl")) {
|
|
@@ -69,8 +69,9 @@ bool PrototypeParser::Parse(Napi::String proto, FunctionInfo *func)
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
param.type = ParseType();
|
|
72
|
-
if (param.type->primitive == PrimitiveKind::Void
|
|
73
|
-
|
|
72
|
+
if (param.type->primitive == PrimitiveKind::Void ||
|
|
73
|
+
param.type->primitive == PrimitiveKind::Array) {
|
|
74
|
+
MarkError("Type %1 cannot be used as a parameter", param.type->name);
|
|
74
75
|
return false;
|
|
75
76
|
}
|
|
76
77
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|