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 CHANGED
@@ -7,6 +7,12 @@
7
7
 
8
8
  ### Koffi 2.12
9
9
 
10
+ #### Koffi 2.12.4
11
+
12
+ *Released on 2025-08-05*
13
+
14
+ - Fix build with old glibc or musl versions
15
+
10
16
  #### Koffi 2.12.3
11
17
 
12
18
  *Released on 2025-07-28*
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, asteriskCount?: number): IKoffiCType;
110
- export function pointer(name: string, ref: TypeSpec, asteriskCount?: number): IKoffiCType;
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(name: string, type: TypeSpec): IKoffiCType;
117
- export function disposable(name: string, type: TypeSpec, freeFunction: Function): IKoffiCType;
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
- // ../../bin/Koffi/package/src/cnoke/src/tools.js
7
+ // package/src/cnoke/src/tools.js
8
8
  var require_tools = __commonJS({
9
- "../../bin/Koffi/package/src/cnoke/src/tools.js"(exports2, module2) {
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
- // ../../bin/Koffi/package/src/koffi/package.json
400
+ // package/src/koffi/package.json
401
401
  var require_package = __commonJS({
402
- "../../bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
402
+ "package/src/koffi/package.json"(exports2, module2) {
403
403
  module2.exports = {
404
404
  name: "koffi",
405
- version: "2.12.3",
406
- stable: "2.12.3",
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
- // ../../bin/Koffi/package/src/koffi/src/init.js
447
+ // package/src/koffi/src/init.js
448
448
  var require_init = __commonJS({
449
- "../../bin/Koffi/package/src/koffi/src/init.js"(exports, module) {
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
- // ../../bin/Koffi/package/src/koffi/index.js
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
- // ../../bin/Koffi/package/src/cnoke/src/tools.js
7
+ // package/src/cnoke/src/tools.js
8
8
  var require_tools = __commonJS({
9
- "../../bin/Koffi/package/src/cnoke/src/tools.js"(exports2, module2) {
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
- // ../../bin/Koffi/package/src/koffi/package.json
400
+ // package/src/koffi/package.json
401
401
  var require_package = __commonJS({
402
- "../../bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
402
+ "package/src/koffi/package.json"(exports2, module2) {
403
403
  module2.exports = {
404
404
  name: "koffi",
405
- version: "2.12.3",
406
- stable: "2.12.3",
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
- // ../../bin/Koffi/package/src/koffi/src/init.js
447
+ // package/src/koffi/src/init.js
448
448
  var require_init = __commonJS({
449
- "../../bin/Koffi/package/src/koffi/src/init.js"(exports, module) {
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
- // ../../bin/Koffi/package/src/koffi/indirect.js
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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koffi",
3
- "version": "2.12.3",
4
- "stable": "2.12.3",
3
+ "version": "2.12.5-beta.1",
4
+ "stable": "2.12.4",
5
5
  "description": "Fast and simple C FFI (foreign function interface) for Node.js",
6
6
  "keywords": [
7
7
  "foreign",