koffi 2.5.5 → 2.5.6
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 +12 -3
- package/build/2.5.6/koffi_darwin_arm64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_darwin_x64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_freebsd_arm64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_freebsd_ia32/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_freebsd_x64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_linux_arm32hf/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_linux_arm64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_linux_ia32/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_linux_riscv64hf64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_linux_x64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_openbsd_ia32/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_openbsd_x64/koffi.node +0 -0
- package/build/2.5.6/koffi_win32_arm64/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_win32_ia32/koffi.node +0 -0
- package/build/{2.5.5 → 2.5.6}/koffi_win32_x64/koffi.node +0 -0
- package/package.json +2 -2
- package/src/core/libcc/libcc.hh +1 -1
- package/src/koffi/src/call.hh +3 -3
- package/src/koffi/src/ffi.cc +4 -4
- package/src/koffi/src/ffi.hh +0 -1
- package/src/koffi/src/parser.cc +2 -2
- package/build/2.5.5/koffi_darwin_arm64/koffi.node +0 -0
- package/build/2.5.5/koffi_win32_arm64/koffi.node +0 -0
- /package/build/{2.5.5 → 2.5.6}/koffi_win32_arm64/koffi.exp +0 -0
- /package/build/{2.5.5 → 2.5.6}/koffi_win32_arm64/koffi.lib +0 -0
- /package/build/{2.5.5 → 2.5.6}/koffi_win32_ia32/koffi.exp +0 -0
- /package/build/{2.5.5 → 2.5.6}/koffi_win32_ia32/koffi.lib +0 -0
- /package/build/{2.5.5 → 2.5.6}/koffi_win32_x64/koffi.exp +0 -0
- /package/build/{2.5.5 → 2.5.6}/koffi_win32_x64/koffi.lib +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,27 +4,36 @@
|
|
|
4
4
|
|
|
5
5
|
### Koffi 2.5
|
|
6
6
|
|
|
7
|
+
#### Koffi 2.5.6
|
|
8
|
+
|
|
9
|
+
**Main changes:**
|
|
10
|
+
|
|
11
|
+
- Increase limit of output parameters from 16 to 32
|
|
12
|
+
|
|
7
13
|
#### Koffi 2.5.5
|
|
8
14
|
|
|
9
15
|
**Main changes:**
|
|
10
16
|
|
|
11
|
-
- Support decoding non-char
|
|
17
|
+
- Support decoding non-char null-terminated arrays
|
|
12
18
|
|
|
13
19
|
#### Koffi 2.5.4
|
|
14
20
|
|
|
15
21
|
**Main changes:**
|
|
16
22
|
|
|
17
|
-
- Fix koffi.pointer() not accepting disposable types
|
|
23
|
+
- Fix `koffi.pointer()` not accepting disposable types
|
|
18
24
|
|
|
19
25
|
**Other changes:**
|
|
20
26
|
|
|
21
|
-
- Fix potential issues when making
|
|
27
|
+
- Fix potential issues when making pointers to anonymous types
|
|
22
28
|
|
|
23
29
|
#### Koffi 2.5.3
|
|
24
30
|
|
|
25
31
|
**Main changes:**
|
|
26
32
|
|
|
27
33
|
- Add missing union exports in TS definition file
|
|
34
|
+
|
|
35
|
+
**Other changes:**
|
|
36
|
+
|
|
28
37
|
- Fix some parameter names in TS definition file
|
|
29
38
|
|
|
30
39
|
#### Koffi 2.5.2
|
|
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/core/libcc/libcc.hh
CHANGED
|
@@ -1254,7 +1254,7 @@ public:
|
|
|
1254
1254
|
RemoveFrom(len - count);
|
|
1255
1255
|
}
|
|
1256
1256
|
|
|
1257
|
-
Span<T> Take() const { return Span<T>(data, len); }
|
|
1257
|
+
Span<T> Take() const { return Span<T>((T *)data, len); }
|
|
1258
1258
|
Span<T> Take(Size offset, Size len) const { return Span<T>((T *)data, N).Take(offset, len); }
|
|
1259
1259
|
Span<T> TakeAvailable() const { return Span<T>((T *)data + len, N - len); }
|
|
1260
1260
|
|
package/src/koffi/src/call.hh
CHANGED
|
@@ -61,9 +61,6 @@ class alignas(8) CallData {
|
|
|
61
61
|
Span<uint8_t> old_stack_mem;
|
|
62
62
|
Span<uint8_t> old_heap_mem;
|
|
63
63
|
|
|
64
|
-
LocalArray<int16_t, 16> used_trampolines;
|
|
65
|
-
LocalArray<OutArgument, MaxOutParameters> out_arguments;
|
|
66
|
-
|
|
67
64
|
uint8_t *new_sp;
|
|
68
65
|
uint8_t *old_sp;
|
|
69
66
|
|
|
@@ -83,6 +80,9 @@ class alignas(8) CallData {
|
|
|
83
80
|
} result;
|
|
84
81
|
uint8_t *return_ptr = nullptr;
|
|
85
82
|
|
|
83
|
+
LocalArray<int16_t, 16> used_trampolines;
|
|
84
|
+
LocalArray<OutArgument, MaxParameters> out_arguments;
|
|
85
|
+
|
|
86
86
|
BlockAllocator call_alloc;
|
|
87
87
|
|
|
88
88
|
public:
|
package/src/koffi/src/ffi.cc
CHANGED
|
@@ -904,8 +904,8 @@ static bool ParseClassicFunction(Napi::Env env, Napi::String name, Napi::Value r
|
|
|
904
904
|
ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 parameters", MaxParameters);
|
|
905
905
|
return false;
|
|
906
906
|
}
|
|
907
|
-
if ((param.directions & 2) && ++func->out_parameters >=
|
|
908
|
-
ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 output parameters",
|
|
907
|
+
if ((param.directions & 2) && ++func->out_parameters >= MaxParameters) {
|
|
908
|
+
ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 output parameters", MaxParameters);
|
|
909
909
|
return false;
|
|
910
910
|
}
|
|
911
911
|
|
|
@@ -1317,8 +1317,8 @@ static Napi::Value TranslateVariadicCall(const FunctionInfo *func, void *native,
|
|
|
1317
1317
|
ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 parameters", MaxParameters);
|
|
1318
1318
|
return env.Null();
|
|
1319
1319
|
}
|
|
1320
|
-
if ((param.directions & 2) && ++copy.out_parameters >=
|
|
1321
|
-
ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 output parameters",
|
|
1320
|
+
if ((param.directions & 2) && ++copy.out_parameters >= MaxParameters) [[unlikely]] {
|
|
1321
|
+
ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 output parameters", MaxParameters);
|
|
1322
1322
|
return env.Null();
|
|
1323
1323
|
}
|
|
1324
1324
|
|
package/src/koffi/src/ffi.hh
CHANGED
package/src/koffi/src/parser.cc
CHANGED
|
@@ -82,8 +82,8 @@ bool PrototypeParser::Parse(const char *str, FunctionInfo *out_func)
|
|
|
82
82
|
MarkError("Functions cannot have more than %1 parameters", MaxParameters);
|
|
83
83
|
return false;
|
|
84
84
|
}
|
|
85
|
-
if ((param.directions & 2) && ++out_func->out_parameters >=
|
|
86
|
-
MarkError("Functions cannot have more than out %1 parameters",
|
|
85
|
+
if ((param.directions & 2) && ++out_func->out_parameters >= MaxParameters) {
|
|
86
|
+
MarkError("Functions cannot have more than out %1 parameters", MaxParameters);
|
|
87
87
|
return false;
|
|
88
88
|
}
|
|
89
89
|
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|