koffi 2.12.5-beta.2 → 2.13.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/CHANGELOG.md +9 -0
- package/build/koffi/darwin_arm64/koffi.node +0 -0
- package/build/koffi/darwin_x64/koffi.node +0 -0
- package/build/koffi/freebsd_arm64/koffi.node +0 -0
- package/build/koffi/freebsd_ia32/koffi.node +0 -0
- package/build/koffi/freebsd_x64/koffi.node +0 -0
- package/build/koffi/linux_arm64/koffi.node +0 -0
- package/build/koffi/linux_armhf/koffi.node +0 -0
- package/build/koffi/linux_ia32/koffi.node +0 -0
- package/build/koffi/linux_loong64/koffi.node +0 -0
- package/build/koffi/linux_riscv64d/koffi.node +0 -0
- package/build/koffi/linux_x64/koffi.node +0 -0
- package/build/koffi/musl_arm64/koffi.node +0 -0
- package/build/koffi/musl_x64/koffi.node +0 -0
- package/build/koffi/openbsd_ia32/koffi.node +0 -0
- package/build/koffi/openbsd_x64/koffi.node +0 -0
- package/build/koffi/win32_arm64/koffi.node +0 -0
- package/build/koffi/win32_ia32/koffi.node +0 -0
- package/build/koffi/win32_x64/koffi.node +0 -0
- package/index.js +8 -8
- package/indirect.js +8 -8
- package/package.json +1 -1
- package/src/koffi/src/ffi.cc +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
## Koffi 2
|
|
7
7
|
|
|
8
|
+
### Koffi 2.13
|
|
9
|
+
|
|
10
|
+
#### Koffi 2.13.0
|
|
11
|
+
|
|
12
|
+
*Released on 2025-08-07*
|
|
13
|
+
|
|
14
|
+
- Support anonymous function prototype types (`koffi.proto()`)
|
|
15
|
+
- Accept null or undefined name to define anonymous composite or pointer types
|
|
16
|
+
|
|
8
17
|
### Koffi 2.12
|
|
9
18
|
|
|
10
19
|
#### Koffi 2.12.4
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -4,9 +4,9 @@ var __commonJS = (cb, mod3) => function __require() {
|
|
|
4
4
|
return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// bin/Koffi/package/src/cnoke/src/tools.js
|
|
7
|
+
// ../../../bin/Koffi/package/src/cnoke/src/tools.js
|
|
8
8
|
var require_tools = __commonJS({
|
|
9
|
-
"bin/Koffi/package/src/cnoke/src/tools.js"(exports2, module2) {
|
|
9
|
+
"../../../bin/Koffi/package/src/cnoke/src/tools.js"(exports2, module2) {
|
|
10
10
|
"use strict";
|
|
11
11
|
var crypto = require("crypto");
|
|
12
12
|
var fs2 = require("fs");
|
|
@@ -397,12 +397,12 @@ var require_tools = __commonJS({
|
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
-
// bin/Koffi/package/src/koffi/package.json
|
|
400
|
+
// ../../../bin/Koffi/package/src/koffi/package.json
|
|
401
401
|
var require_package = __commonJS({
|
|
402
|
-
"bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
|
|
402
|
+
"../../../bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
|
|
403
403
|
module2.exports = {
|
|
404
404
|
name: "koffi",
|
|
405
|
-
version: "2.
|
|
405
|
+
version: "2.13.0",
|
|
406
406
|
description: "Fast and simple C FFI (foreign function interface) for Node.js",
|
|
407
407
|
keywords: [
|
|
408
408
|
"foreign",
|
|
@@ -443,9 +443,9 @@ var require_package = __commonJS({
|
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
-
// bin/Koffi/package/src/koffi/src/init.js
|
|
446
|
+
// ../../../bin/Koffi/package/src/koffi/src/init.js
|
|
447
447
|
var require_init = __commonJS({
|
|
448
|
-
"bin/Koffi/package/src/koffi/src/init.js"(exports, module) {
|
|
448
|
+
"../../../bin/Koffi/package/src/koffi/src/init.js"(exports, module) {
|
|
449
449
|
var fs = require("fs");
|
|
450
450
|
var path = require("path");
|
|
451
451
|
var util = require("util");
|
|
@@ -528,7 +528,7 @@ var require_init = __commonJS({
|
|
|
528
528
|
}
|
|
529
529
|
});
|
|
530
530
|
|
|
531
|
-
// bin/Koffi/package/src/koffi/index.js
|
|
531
|
+
// ../../../bin/Koffi/package/src/koffi/index.js
|
|
532
532
|
var { detect: detect2, init: init2 } = require_init();
|
|
533
533
|
var triplet2 = detect2();
|
|
534
534
|
var native2 = null;
|
package/indirect.js
CHANGED
|
@@ -4,9 +4,9 @@ var __commonJS = (cb, mod3) => function __require() {
|
|
|
4
4
|
return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// bin/Koffi/package/src/cnoke/src/tools.js
|
|
7
|
+
// ../../../bin/Koffi/package/src/cnoke/src/tools.js
|
|
8
8
|
var require_tools = __commonJS({
|
|
9
|
-
"bin/Koffi/package/src/cnoke/src/tools.js"(exports2, module2) {
|
|
9
|
+
"../../../bin/Koffi/package/src/cnoke/src/tools.js"(exports2, module2) {
|
|
10
10
|
"use strict";
|
|
11
11
|
var crypto = require("crypto");
|
|
12
12
|
var fs2 = require("fs");
|
|
@@ -397,12 +397,12 @@ var require_tools = __commonJS({
|
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
-
// bin/Koffi/package/src/koffi/package.json
|
|
400
|
+
// ../../../bin/Koffi/package/src/koffi/package.json
|
|
401
401
|
var require_package = __commonJS({
|
|
402
|
-
"bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
|
|
402
|
+
"../../../bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
|
|
403
403
|
module2.exports = {
|
|
404
404
|
name: "koffi",
|
|
405
|
-
version: "2.
|
|
405
|
+
version: "2.13.0",
|
|
406
406
|
description: "Fast and simple C FFI (foreign function interface) for Node.js",
|
|
407
407
|
keywords: [
|
|
408
408
|
"foreign",
|
|
@@ -443,9 +443,9 @@ var require_package = __commonJS({
|
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
-
// bin/Koffi/package/src/koffi/src/init.js
|
|
446
|
+
// ../../../bin/Koffi/package/src/koffi/src/init.js
|
|
447
447
|
var require_init = __commonJS({
|
|
448
|
-
"bin/Koffi/package/src/koffi/src/init.js"(exports, module) {
|
|
448
|
+
"../../../bin/Koffi/package/src/koffi/src/init.js"(exports, module) {
|
|
449
449
|
var fs = require("fs");
|
|
450
450
|
var path = require("path");
|
|
451
451
|
var util = require("util");
|
|
@@ -528,7 +528,7 @@ var require_init = __commonJS({
|
|
|
528
528
|
}
|
|
529
529
|
});
|
|
530
530
|
|
|
531
|
-
// bin/Koffi/package/src/koffi/indirect.js
|
|
531
|
+
// ../../../bin/Koffi/package/src/koffi/indirect.js
|
|
532
532
|
var { detect: detect2, init: init2 } = require_init();
|
|
533
533
|
var triplet2 = detect2();
|
|
534
534
|
var mod2 = init2(triplet2, null);
|
package/package.json
CHANGED
package/src/koffi/src/ffi.cc
CHANGED
|
@@ -1018,24 +1018,24 @@ static bool ParseClassicFunction(const Napi::CallbackInfo &info, bool concrete,
|
|
|
1018
1018
|
|
|
1019
1019
|
bool named = parameters.IsArray();
|
|
1020
1020
|
|
|
1021
|
-
if (
|
|
1022
|
-
parameters = ret.As<Napi::Array>();
|
|
1023
|
-
ret = name;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1021
|
+
if (named) {
|
|
1026
1022
|
#if defined(_WIN32)
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1023
|
+
if (name.IsNumber()) {
|
|
1024
|
+
out_func->ordinal_name = name.As<Napi::Number>().Int32Value();
|
|
1025
|
+
name = name.ToString();
|
|
1026
|
+
}
|
|
1031
1027
|
#endif
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1028
|
+
if (!name.IsString()) {
|
|
1029
|
+
if (!concrete && IsNullOrUndefined(name)) {
|
|
1030
|
+
named = false;
|
|
1031
|
+
} else {
|
|
1032
|
+
ThrowError<Napi::TypeError>(env, "Unexpected %1 value for name, expected string or integer", GetValueType(instance, name));
|
|
1033
|
+
return false;
|
|
1034
|
+
}
|
|
1038
1035
|
}
|
|
1036
|
+
} else {
|
|
1037
|
+
parameters = ret.As<Napi::Array>();
|
|
1038
|
+
ret = name;
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
1041
|
// Leave anonymous naming responsibility to caller
|