Skip to content

Commit 02b531e

Browse files
committed
chore: bump version to 1.13.0 and update dependencies
1 parent 79cb62b commit 02b531e

7 files changed

Lines changed: 54 additions & 21 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-ctypes",
3-
"version": "1.12.0",
3+
"version": "1.13.0",
44
"description": "Python ctypes-like FFI for Node.js using libffi",
55
"author": "Damiano Mazzella",
66
"license": "MIT",

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
22

33
#define CTYPES_MAJOR_VERSION 1
4-
#define CTYPES_MINOR_VERSION 12
4+
#define CTYPES_MINOR_VERSION 13
55
#define CTYPES_PATCH_VERSION 0

tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"node-ctypes": "file:.."
1818
},
1919
"devDependencies": {
20-
"koffi": "^3.0.0"
20+
"koffi": "^3.0.2"
2121
}
2222
}

third-party/libffi

Submodule libffi updated 73 files

third-party/libffi_cmake/fficonfig/ffi.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* -----------------------------------------------------------------*-C-*-
2-
libffi 3.5.2
2+
libffi 3.6.0
33
- Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024, 2025 Anthony Green
44
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
55
@@ -55,7 +55,7 @@ extern "C" {
5555
*
5656
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
5757
* Generated by: third-party/libffi_cmake/generate-headers.js
58-
* From libffi version: 3.5.2
58+
* From libffi version: 3.6.0
5959
*
6060
* ============================================================================
6161
*/
@@ -114,9 +114,11 @@ extern "C" {
114114
#define FFI_TYPE_STRUCT 13
115115
#define FFI_TYPE_POINTER 14
116116
#define FFI_TYPE_COMPLEX 15
117+
#define FFI_TYPE_UINT128 16
118+
#define FFI_TYPE_SINT128 17
117119

118120
/* This should always refer to the last type code (for sanity checks). */
119-
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
121+
#define FFI_TYPE_LAST FFI_TYPE_SINT128
120122

121123
/* Include the appropriate ffitarget.h based on architecture */
122124
#if defined(X86_WIN64) || defined(X86_64) || defined(X86_WIN32) || defined(X86)
@@ -273,6 +275,11 @@ FFI_EXTERN ffi_type ffi_type_complex_float;
273275
FFI_EXTERN ffi_type ffi_type_complex_double;
274276
FFI_EXTERN ffi_type ffi_type_complex_longdouble;
275277
#endif
278+
279+
#ifdef FFI_TARGET_HAS_INT128
280+
FFI_EXTERN ffi_type ffi_type_uint128;
281+
FFI_EXTERN ffi_type ffi_type_sint128;
282+
#endif
276283
#endif /* LIBFFI_HIDE_BASIC_TYPES */
277284

278285
typedef enum {
@@ -378,8 +385,8 @@ size_t ffi_java_raw_size (ffi_cif *cif)
378385

379386
/* ---- Version API ------------------------------------------------------ */
380387

381-
#define FFI_VERSION_STRING "3.5.2"
382-
#define FFI_VERSION_NUMBER 30502
388+
#define FFI_VERSION_STRING "3.6.0"
389+
#define FFI_VERSION_NUMBER 30600
383390

384391
#ifndef LIBFFI_ASM
385392
/* Return a version string. */
@@ -406,6 +413,11 @@ typedef struct {
406413
void *trampoline_table;
407414
void *trampoline_table_entry;
408415
#else
416+
/* Anonymous unions are C11 (a GNU extension in C99); __extension__ keeps
417+
the field names without tripping -Wpedantic under -std=c99 (#795). */
418+
#ifdef __GNUC__
419+
__extension__
420+
#endif
409421
union {
410422
char tramp[FFI_TRAMPOLINE_SIZE];
411423
void *ftramp;

third-party/libffi_cmake/fficonfig/fficonfig.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
66
* Generated by: third-party/libffi_cmake/generate-headers.js
7-
* From libffi version: 3.5.2
7+
* From libffi version: 3.6.0
88
*
99
* This file replaces the autotools-generated fficonfig.h with a unified
1010
* version that uses preprocessor macros for platform detection.
@@ -18,12 +18,12 @@
1818
/* Package information */
1919
#define PACKAGE "libffi"
2020
#define PACKAGE_NAME "libffi"
21-
#define PACKAGE_VERSION "3.5.2"
22-
#define PACKAGE_STRING "libffi 3.5.2"
21+
#define PACKAGE_VERSION "3.6.0"
22+
#define PACKAGE_STRING "libffi 3.6.0"
2323
#define PACKAGE_TARNAME "libffi"
2424
#define PACKAGE_BUGREPORT "http://github.com/libffi/libffi/issues"
2525
#define PACKAGE_URL ""
26-
#define VERSION "3.5.2"
26+
#define VERSION "3.6.0"
2727

2828
/* ============================================================================
2929
* Platform Detection

third-party/libffi_cmake/generate-headers.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,43 @@ const TEMPLATE_DIR = __dirname;
2424
const OUTPUT_DIR = path.join(__dirname, "fficonfig");
2525

2626
/**
27-
* Extract version info from configure.ac
27+
* Extract version info from configure.ac.
28+
*
29+
* The release version comes from AC_INIT(...), which is the single source of
30+
* truth (it drives autotools' @VERSION@). The FFI_VERSION_STRING /
31+
* FFI_VERSION_NUMBER lines are cross-checked and a warning is emitted if they
32+
* drift, because upstream has at times forgotten to bump them in lockstep with
33+
* AC_INIT (e.g. libffi 3.6.0 still declares FFI_VERSION_STRING="3.5.2").
2834
*/
2935
function extractVersion() {
3036
const configureAc = fs.readFileSync(path.join(LIBFFI_DIR, "configure.ac"), "utf8");
3137

38+
// Primary source of truth: AC_INIT([libffi],[X.Y.Z],...)
39+
const acInitMatch = configureAc.match(/AC_INIT\(\s*\[libffi\]\s*,\s*\[([^\]]+)\]/);
40+
if (!acInitMatch) {
41+
throw new Error("Could not extract version from AC_INIT in configure.ac");
42+
}
43+
const string = acInitMatch[1].trim();
44+
45+
// Derive the numeric form (x * 10000 + y * 100 + z) from the release version.
46+
const parts = string.split(".").map((n) => parseInt(n, 10));
47+
if (parts.length < 3 || parts.some((n) => Number.isNaN(n))) {
48+
throw new Error(`Unexpected libffi version format: "${string}"`);
49+
}
50+
const [major, minor, patch] = parts;
51+
const number = major * 10000 + minor * 100 + patch;
52+
53+
// Cross-check against the FFI_VERSION_* lines and warn on drift.
3254
const versionStringMatch = configureAc.match(/FFI_VERSION_STRING="([^"]+)"/);
3355
const versionNumberMatch = configureAc.match(/FFI_VERSION_NUMBER=(\d+)/);
34-
35-
if (!versionStringMatch || !versionNumberMatch) {
36-
throw new Error("Could not extract version from configure.ac");
56+
if (versionStringMatch && versionStringMatch[1] !== string) {
57+
console.warn(`Warning: FFI_VERSION_STRING="${versionStringMatch[1]}" disagrees with AC_INIT "${string}"; using AC_INIT.`);
58+
}
59+
if (versionNumberMatch && parseInt(versionNumberMatch[1], 10) !== number) {
60+
console.warn(`Warning: FFI_VERSION_NUMBER=${versionNumberMatch[1]} disagrees with derived ${number}; using ${number}.`);
3761
}
3862

39-
return {
40-
string: versionStringMatch[1],
41-
number: parseInt(versionNumberMatch[1], 10),
42-
};
63+
return { string, number };
4364
}
4465

4566
/**

0 commit comments

Comments
 (0)