11/* -----------------------------------------------------------------*-C-*-
22 libffi @VERSION@
3- - Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
3+ - Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024, 2025, 2026 Anthony Green
44 - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
55
66 Permission is hereby granted, free of charge, to any person
@@ -88,9 +88,10 @@ extern "C" {
8888#define FFI_TYPE_COMPLEX 15
8989#define FFI_TYPE_UINT128 16
9090#define FFI_TYPE_SINT128 17
91+ #define FFI_TYPE_VECTOR 18
9192
9293/* This should always refer to the last type code (for sanity checks). */
93- #define FFI_TYPE_LAST FFI_TYPE_SINT128
94+ #define FFI_TYPE_LAST FFI_TYPE_VECTOR
9495
9596#include <ffitarget.h>
9697
@@ -332,8 +333,8 @@ size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated));
332333
333334/* ---- Version API ------------------------------------------------------ */
334335
335- #define FFI_VERSION_STRING "3.7 .0"
336- #define FFI_VERSION_NUMBER 30700
336+ #define FFI_VERSION_STRING "3.8 .0"
337+ #define FFI_VERSION_NUMBER 30800
337338
338339#ifndef LIBFFI_ASM
339340/* Return a version string. */
@@ -544,7 +545,11 @@ void ffi_call(ffi_cif *cif,
544545 ffi_call_plan_alloc returns NULL only on allocation failure; a signature
545546 with no fast path is still valid and ffi_call_plan_invoke falls back to
546547 ffi_call for it. A plan is immutable once built, so it may be shared and
547- invoked concurrently from multiple threads. */
548+ invoked concurrently from multiple threads.
549+
550+ ffi_call_plan_size reports the total number of bytes libffi allocated for a
551+ plan, so that callers tracking the footprint of long-lived plans do not have
552+ to guess at the size of an opaque type. */
548553typedef struct ffi_call_plan ffi_call_plan ;
549554
550555FFI_API
@@ -559,6 +564,9 @@ void ffi_call_plan_invoke (ffi_call_plan *plan,
559564FFI_API
560565void ffi_call_plan_free (ffi_call_plan * plan );
561566
567+ FFI_API
568+ size_t ffi_call_plan_size (ffi_call_plan * plan );
569+
562570FFI_API
563571ffi_status ffi_get_struct_offsets (ffi_abi abi , ffi_type * struct_type ,
564572 size_t * offsets );
0 commit comments