koffi 2.12.3 → 2.12.5-beta.1
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/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.d.ts +15 -13
- package/index.js +9 -9
- package/indirect.js +9 -9
- package/package.json +2 -2
- package/src/core/base/base.cc +395 -74
- package/src/core/base/base.hh +44 -11
- package/src/core/base/crc.inc +2232 -0
- package/src/core/base/crc_gen.py +109 -0
- package/src/koffi/src/ffi.cc +45 -28
- package/src/koffi/src/parser.cc +15 -21
- package/src/koffi/src/parser.hh +2 -3
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -82,14 +82,14 @@ export interface IKoffiLib {
|
|
|
82
82
|
unload(): void;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
export function struct(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
85
|
+
export function struct(name: string | null | undefined, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
86
86
|
export function struct(ref: IKoffiCType, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
87
87
|
export function struct(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
88
|
-
export function pack(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
88
|
+
export function pack(name: string | null | undefined, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
89
89
|
export function pack(ref: IKoffiCType, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
90
90
|
export function pack(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
91
91
|
|
|
92
|
-
export function union(name: string, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
92
|
+
export function union(name: string | null | undefined, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
93
93
|
export function union(ref: IKoffiCType, def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
94
94
|
export function union(def: Record<string, TypeSpecWithAlignment>): IKoffiCType;
|
|
95
95
|
|
|
@@ -100,28 +100,30 @@ export class Union {
|
|
|
100
100
|
|
|
101
101
|
export function array(ref: TypeSpec, len: number, hint?: ArrayHint | null): IKoffiCType;
|
|
102
102
|
|
|
103
|
-
export function opaque(name: string): IKoffiCType;
|
|
103
|
+
export function opaque(name: string | null | undefined): IKoffiCType;
|
|
104
104
|
export function opaque(): IKoffiCType;
|
|
105
|
-
/** @deprecated */ export function handle(name: string): IKoffiCType;
|
|
105
|
+
/** @deprecated */ export function handle(name: string | null | undefined): IKoffiCType;
|
|
106
106
|
/** @deprecated */ export function handle(): IKoffiCType;
|
|
107
107
|
|
|
108
108
|
export function pointer(ref: TypeSpec): IKoffiCType;
|
|
109
|
-
export function pointer(ref: TypeSpec,
|
|
110
|
-
export function pointer(name: string, ref: TypeSpec
|
|
109
|
+
export function pointer(ref: TypeSpec, count: number): IKoffiCType;
|
|
110
|
+
export function pointer(name: string | null | undefined, ref: TypeSpec): IKoffiCType;
|
|
111
|
+
export function pointer(name: string | null | undefined, ref: TypeSpec, count: number): IKoffiCType;
|
|
111
112
|
|
|
112
113
|
export function out(type: TypeSpec): IKoffiCType;
|
|
113
114
|
export function inout(type: TypeSpec): IKoffiCType;
|
|
114
115
|
|
|
115
116
|
export function disposable(type: TypeSpec): IKoffiCType;
|
|
116
|
-
export function disposable(
|
|
117
|
-
export function disposable(name: string, type: TypeSpec
|
|
117
|
+
export function disposable(type: TypeSpec, freeFunction: Function): IKoffiCType;
|
|
118
|
+
export function disposable(name: string | null | undefined, type: TypeSpec): IKoffiCType;
|
|
119
|
+
export function disposable(name: string | null | undefined, type: TypeSpec, freeFunction: Function): IKoffiCType;
|
|
118
120
|
|
|
119
121
|
export function proto(definition: string): IKoffiCType;
|
|
120
|
-
export function proto(name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
121
|
-
export function proto(convention: string, name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
122
|
+
export function proto(name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
123
|
+
export function proto(convention: string, name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
122
124
|
/** @deprecated */ export function callback(definition: string): IKoffiCType;
|
|
123
|
-
/** @deprecated */ export function callback(name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
124
|
-
/** @deprecated */ export function callback(convention: string, name: string, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
125
|
+
/** @deprecated */ export function callback(name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
126
|
+
/** @deprecated */ export function callback(convention: string, name: string | null | undefined, result: TypeSpec, arguments: TypeSpec[]): IKoffiCType;
|
|
125
127
|
|
|
126
128
|
export function register(callback: Function, type: TypeSpec): IKoffiRegisteredCallback;
|
|
127
129
|
export function register(thisValue: any, callback: Function, type: TypeSpec): IKoffiRegisteredCallback;
|
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
|
-
//
|
|
7
|
+
// package/src/cnoke/src/tools.js
|
|
8
8
|
var require_tools = __commonJS({
|
|
9
|
-
"
|
|
9
|
+
"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,13 +397,13 @@ var require_tools = __commonJS({
|
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
-
//
|
|
400
|
+
// package/src/koffi/package.json
|
|
401
401
|
var require_package = __commonJS({
|
|
402
|
-
"
|
|
402
|
+
"package/src/koffi/package.json"(exports2, module2) {
|
|
403
403
|
module2.exports = {
|
|
404
404
|
name: "koffi",
|
|
405
|
-
version: "2.12.
|
|
406
|
-
stable: "2.12.
|
|
405
|
+
version: "2.12.5-beta.1",
|
|
406
|
+
stable: "2.12.4",
|
|
407
407
|
description: "Fast and simple C FFI (foreign function interface) for Node.js",
|
|
408
408
|
keywords: [
|
|
409
409
|
"foreign",
|
|
@@ -444,9 +444,9 @@ var require_package = __commonJS({
|
|
|
444
444
|
}
|
|
445
445
|
});
|
|
446
446
|
|
|
447
|
-
//
|
|
447
|
+
// package/src/koffi/src/init.js
|
|
448
448
|
var require_init = __commonJS({
|
|
449
|
-
"
|
|
449
|
+
"package/src/koffi/src/init.js"(exports, module) {
|
|
450
450
|
var fs = require("fs");
|
|
451
451
|
var path = require("path");
|
|
452
452
|
var util = require("util");
|
|
@@ -529,7 +529,7 @@ var require_init = __commonJS({
|
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
531
|
|
|
532
|
-
//
|
|
532
|
+
// package/src/koffi/index.js
|
|
533
533
|
var { detect: detect2, init: init2 } = require_init();
|
|
534
534
|
var triplet2 = detect2();
|
|
535
535
|
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
|
-
//
|
|
7
|
+
// package/src/cnoke/src/tools.js
|
|
8
8
|
var require_tools = __commonJS({
|
|
9
|
-
"
|
|
9
|
+
"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,13 +397,13 @@ var require_tools = __commonJS({
|
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
-
//
|
|
400
|
+
// package/src/koffi/package.json
|
|
401
401
|
var require_package = __commonJS({
|
|
402
|
-
"
|
|
402
|
+
"package/src/koffi/package.json"(exports2, module2) {
|
|
403
403
|
module2.exports = {
|
|
404
404
|
name: "koffi",
|
|
405
|
-
version: "2.12.
|
|
406
|
-
stable: "2.12.
|
|
405
|
+
version: "2.12.5-beta.1",
|
|
406
|
+
stable: "2.12.4",
|
|
407
407
|
description: "Fast and simple C FFI (foreign function interface) for Node.js",
|
|
408
408
|
keywords: [
|
|
409
409
|
"foreign",
|
|
@@ -444,9 +444,9 @@ var require_package = __commonJS({
|
|
|
444
444
|
}
|
|
445
445
|
});
|
|
446
446
|
|
|
447
|
-
//
|
|
447
|
+
// package/src/koffi/src/init.js
|
|
448
448
|
var require_init = __commonJS({
|
|
449
|
-
"
|
|
449
|
+
"package/src/koffi/src/init.js"(exports, module) {
|
|
450
450
|
var fs = require("fs");
|
|
451
451
|
var path = require("path");
|
|
452
452
|
var util = require("util");
|
|
@@ -529,7 +529,7 @@ var require_init = __commonJS({
|
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
531
|
|
|
532
|
-
//
|
|
532
|
+
// package/src/koffi/indirect.js
|
|
533
533
|
var { detect: detect2, init: init2 } = require_init();
|
|
534
534
|
var triplet2 = detect2();
|
|
535
535
|
var mod2 = init2(triplet2, null);
|