mirror of
https://github.com/libffi/libffi.git
synced 2026-01-26 18:08:57 +00:00
feat: Add ffi_get_default_abi and ffi_get_closure_size functions
This commit is contained in:
parent
b14d43793a
commit
074c423f86
@ -206,6 +206,7 @@ See the git log for details at http://github.com/libffi/libffi.
|
||||
3.5.0 Jun-8-2025
|
||||
Add FFI_VERSION_STRING and FFI_VERSION_NUMBER macros, as well
|
||||
as ffi_get_version() and ffi_get_version_number() functions.
|
||||
Add ffi_get_default_abi() and ffi_get_closure_size() functions.
|
||||
Fix closures on powerpc64-linux when statically linking.
|
||||
Mark the PA stack as non-executable.
|
||||
|
||||
|
||||
@ -250,6 +250,16 @@ This number is also available at build time as the macro
|
||||
@code{FFI_VERSION_NUMBER}.
|
||||
@end defun
|
||||
|
||||
@findex ffi_get_default_abi
|
||||
@defun {unsigned int} ffi_get_default_abi (void)
|
||||
Return the value of @code{FFI_DEFAULT_ABI}.
|
||||
@end defun
|
||||
|
||||
@findex ffi_get_closure_size
|
||||
@defun {size_t} ffi_get_closure_size (void)
|
||||
Return @code{sizeof(ffi_closure)}.
|
||||
@end defun
|
||||
|
||||
@node Simple Example
|
||||
@section Simple Example
|
||||
|
||||
|
||||
@ -327,6 +327,11 @@ FFI_API const char *ffi_get_version (void);
|
||||
FFI_API unsigned long ffi_get_version_number (void);
|
||||
#endif
|
||||
|
||||
/* ---- Internals API ---------------------------------------------------- */
|
||||
|
||||
FFI_API unsigned int ffi_get_default_abi (void);
|
||||
FFI_API size_t ffi_get_closure_size (void);
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#if FFI_CLOSURES
|
||||
|
||||
@ -27,6 +27,9 @@ LIBFFI_BASE_8.0 {
|
||||
ffi_get_version;
|
||||
ffi_get_version_number;
|
||||
|
||||
ffi_get_default_abi;
|
||||
ffi_get_closure_size;
|
||||
|
||||
ffi_call;
|
||||
ffi_prep_cif;
|
||||
ffi_prep_cif_var;
|
||||
|
||||
12
src/types.c
12
src/types.c
@ -1,5 +1,5 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
types.c - Copyright (c) 1996, 1998, 2024 Red Hat, Inc.
|
||||
types.c - Copyright (c) 1996, 1998, 2024, 2025 Red Hat, Inc.
|
||||
|
||||
Predefined ffi_types needed by libffi.
|
||||
|
||||
@ -43,6 +43,16 @@ unsigned long ffi_get_version_number (void)
|
||||
return FFI_VERSION_NUMBER;
|
||||
}
|
||||
|
||||
unsigned int ffi_get_default_abi (void)
|
||||
{
|
||||
return FFI_DEFAULT_ABI;
|
||||
}
|
||||
|
||||
size_t ffi_get_closure_size (void)
|
||||
{
|
||||
return sizeof(ffi_closure);
|
||||
}
|
||||
|
||||
/* Type definitions */
|
||||
|
||||
#define FFI_TYPEDEF(name, type, id, maybe_const)\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user