Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/saltstac.../salt/include
File: ffi.h
/* -----------------------------------------------------------------*-C-*-
[0] Fix | Delete
libffi 3.4.6
[1] Fix | Delete
- Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
[2] Fix | Delete
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
[3] Fix | Delete
[4] Fix | Delete
Permission is hereby granted, free of charge, to any person
[5] Fix | Delete
obtaining a copy of this software and associated documentation
[6] Fix | Delete
files (the ``Software''), to deal in the Software without
[7] Fix | Delete
restriction, including without limitation the rights to use, copy,
[8] Fix | Delete
modify, merge, publish, distribute, sublicense, and/or sell copies
[9] Fix | Delete
of the Software, and to permit persons to whom the Software is
[10] Fix | Delete
furnished to do so, subject to the following conditions:
[11] Fix | Delete
[12] Fix | Delete
The above copyright notice and this permission notice shall be
[13] Fix | Delete
included in all copies or substantial portions of the Software.
[14] Fix | Delete
[15] Fix | Delete
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
[16] Fix | Delete
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
[17] Fix | Delete
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
[18] Fix | Delete
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
[19] Fix | Delete
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
[20] Fix | Delete
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
[21] Fix | Delete
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
[22] Fix | Delete
DEALINGS IN THE SOFTWARE.
[23] Fix | Delete
[24] Fix | Delete
----------------------------------------------------------------------- */
[25] Fix | Delete
[26] Fix | Delete
/* -------------------------------------------------------------------
[27] Fix | Delete
Most of the API is documented in doc/libffi.texi.
[28] Fix | Delete
[29] Fix | Delete
The raw API is designed to bypass some of the argument packing and
[30] Fix | Delete
unpacking on architectures for which it can be avoided. Routines
[31] Fix | Delete
are provided to emulate the raw API if the underlying platform
[32] Fix | Delete
doesn't allow faster implementation.
[33] Fix | Delete
[34] Fix | Delete
More details on the raw API can be found in:
[35] Fix | Delete
[36] Fix | Delete
http://gcc.gnu.org/ml/java/1999-q3/msg00138.html
[37] Fix | Delete
[38] Fix | Delete
and
[39] Fix | Delete
[40] Fix | Delete
http://gcc.gnu.org/ml/java/1999-q3/msg00174.html
[41] Fix | Delete
-------------------------------------------------------------------- */
[42] Fix | Delete
[43] Fix | Delete
#ifndef LIBFFI_H
[44] Fix | Delete
#define LIBFFI_H
[45] Fix | Delete
[46] Fix | Delete
#ifdef __cplusplus
[47] Fix | Delete
extern "C" {
[48] Fix | Delete
#endif
[49] Fix | Delete
[50] Fix | Delete
/* Specify which architecture libffi is configured for. */
[51] Fix | Delete
#ifndef X86_64
[52] Fix | Delete
#define X86_64
[53] Fix | Delete
#endif
[54] Fix | Delete
[55] Fix | Delete
/* ---- System configuration information --------------------------------- */
[56] Fix | Delete
[57] Fix | Delete
/* If these change, update src/mips/ffitarget.h. */
[58] Fix | Delete
#define FFI_TYPE_VOID 0
[59] Fix | Delete
#define FFI_TYPE_INT 1
[60] Fix | Delete
#define FFI_TYPE_FLOAT 2
[61] Fix | Delete
#define FFI_TYPE_DOUBLE 3
[62] Fix | Delete
#if 1
[63] Fix | Delete
#define FFI_TYPE_LONGDOUBLE 4
[64] Fix | Delete
#else
[65] Fix | Delete
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
[66] Fix | Delete
#endif
[67] Fix | Delete
#define FFI_TYPE_UINT8 5
[68] Fix | Delete
#define FFI_TYPE_SINT8 6
[69] Fix | Delete
#define FFI_TYPE_UINT16 7
[70] Fix | Delete
#define FFI_TYPE_SINT16 8
[71] Fix | Delete
#define FFI_TYPE_UINT32 9
[72] Fix | Delete
#define FFI_TYPE_SINT32 10
[73] Fix | Delete
#define FFI_TYPE_UINT64 11
[74] Fix | Delete
#define FFI_TYPE_SINT64 12
[75] Fix | Delete
#define FFI_TYPE_STRUCT 13
[76] Fix | Delete
#define FFI_TYPE_POINTER 14
[77] Fix | Delete
#define FFI_TYPE_COMPLEX 15
[78] Fix | Delete
[79] Fix | Delete
/* This should always refer to the last type code (for sanity checks). */
[80] Fix | Delete
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
[81] Fix | Delete
[82] Fix | Delete
#include <ffitarget.h>
[83] Fix | Delete
[84] Fix | Delete
#ifndef LIBFFI_ASM
[85] Fix | Delete
[86] Fix | Delete
#if defined(_MSC_VER) && !defined(__clang__)
[87] Fix | Delete
#define __attribute__(X)
[88] Fix | Delete
#endif
[89] Fix | Delete
[90] Fix | Delete
#include <stddef.h>
[91] Fix | Delete
#include <limits.h>
[92] Fix | Delete
[93] Fix | Delete
/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example).
[94] Fix | Delete
But we can find it either under the correct ANSI name, or under GNU
[95] Fix | Delete
C's internal name. */
[96] Fix | Delete
[97] Fix | Delete
#define FFI_64_BIT_MAX 9223372036854775807
[98] Fix | Delete
[99] Fix | Delete
#ifdef LONG_LONG_MAX
[100] Fix | Delete
# define FFI_LONG_LONG_MAX LONG_LONG_MAX
[101] Fix | Delete
#else
[102] Fix | Delete
# ifdef LLONG_MAX
[103] Fix | Delete
# define FFI_LONG_LONG_MAX LLONG_MAX
[104] Fix | Delete
# ifdef _AIX52 /* or newer has C99 LLONG_MAX */
[105] Fix | Delete
# undef FFI_64_BIT_MAX
[106] Fix | Delete
# define FFI_64_BIT_MAX 9223372036854775807LL
[107] Fix | Delete
# endif /* _AIX52 or newer */
[108] Fix | Delete
# else
[109] Fix | Delete
# ifdef __GNUC__
[110] Fix | Delete
# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__
[111] Fix | Delete
# endif
[112] Fix | Delete
# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */
[113] Fix | Delete
# ifndef __PPC64__
[114] Fix | Delete
# if defined (__IBMC__) || defined (__IBMCPP__)
[115] Fix | Delete
# define FFI_LONG_LONG_MAX LONGLONG_MAX
[116] Fix | Delete
# endif
[117] Fix | Delete
# endif /* __PPC64__ */
[118] Fix | Delete
# undef FFI_64_BIT_MAX
[119] Fix | Delete
# define FFI_64_BIT_MAX 9223372036854775807LL
[120] Fix | Delete
# endif
[121] Fix | Delete
# endif
[122] Fix | Delete
#endif
[123] Fix | Delete
[124] Fix | Delete
/* The closure code assumes that this works on pointers, i.e. a size_t
[125] Fix | Delete
can hold a pointer. */
[126] Fix | Delete
[127] Fix | Delete
typedef struct _ffi_type
[128] Fix | Delete
{
[129] Fix | Delete
size_t size;
[130] Fix | Delete
unsigned short alignment;
[131] Fix | Delete
unsigned short type;
[132] Fix | Delete
struct _ffi_type **elements;
[133] Fix | Delete
} ffi_type;
[134] Fix | Delete
[135] Fix | Delete
/* Need minimal decorations for DLLs to work on Windows. GCC has
[136] Fix | Delete
autoimport and autoexport. Always mark externally visible symbols
[137] Fix | Delete
as dllimport for MSVC clients, even if it means an extra indirection
[138] Fix | Delete
when using the static version of the library.
[139] Fix | Delete
Besides, as a workaround, they can define FFI_BUILDING if they
[140] Fix | Delete
*know* they are going to link with the static library. */
[141] Fix | Delete
#if defined _MSC_VER && !defined(FFI_STATIC_BUILD)
[142] Fix | Delete
# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */
[143] Fix | Delete
# define FFI_API __declspec(dllexport)
[144] Fix | Delete
# else /* Importing libffi.DLL */
[145] Fix | Delete
# define FFI_API __declspec(dllimport)
[146] Fix | Delete
# endif
[147] Fix | Delete
#else
[148] Fix | Delete
# define FFI_API
[149] Fix | Delete
#endif
[150] Fix | Delete
[151] Fix | Delete
/* The externally visible type declarations also need the MSVC DLL
[152] Fix | Delete
decorations, or they will not be exported from the object file. */
[153] Fix | Delete
#if defined LIBFFI_HIDE_BASIC_TYPES
[154] Fix | Delete
# define FFI_EXTERN FFI_API
[155] Fix | Delete
#else
[156] Fix | Delete
# define FFI_EXTERN extern FFI_API
[157] Fix | Delete
#endif
[158] Fix | Delete
[159] Fix | Delete
#ifndef LIBFFI_HIDE_BASIC_TYPES
[160] Fix | Delete
#if SCHAR_MAX == 127
[161] Fix | Delete
# define ffi_type_uchar ffi_type_uint8
[162] Fix | Delete
# define ffi_type_schar ffi_type_sint8
[163] Fix | Delete
#else
[164] Fix | Delete
#error "char size not supported"
[165] Fix | Delete
#endif
[166] Fix | Delete
[167] Fix | Delete
#if SHRT_MAX == 32767
[168] Fix | Delete
# define ffi_type_ushort ffi_type_uint16
[169] Fix | Delete
# define ffi_type_sshort ffi_type_sint16
[170] Fix | Delete
#elif SHRT_MAX == 2147483647
[171] Fix | Delete
# define ffi_type_ushort ffi_type_uint32
[172] Fix | Delete
# define ffi_type_sshort ffi_type_sint32
[173] Fix | Delete
#else
[174] Fix | Delete
#error "short size not supported"
[175] Fix | Delete
#endif
[176] Fix | Delete
[177] Fix | Delete
#if INT_MAX == 32767
[178] Fix | Delete
# define ffi_type_uint ffi_type_uint16
[179] Fix | Delete
# define ffi_type_sint ffi_type_sint16
[180] Fix | Delete
#elif INT_MAX == 2147483647
[181] Fix | Delete
# define ffi_type_uint ffi_type_uint32
[182] Fix | Delete
# define ffi_type_sint ffi_type_sint32
[183] Fix | Delete
#elif INT_MAX == 9223372036854775807
[184] Fix | Delete
# define ffi_type_uint ffi_type_uint64
[185] Fix | Delete
# define ffi_type_sint ffi_type_sint64
[186] Fix | Delete
#else
[187] Fix | Delete
#error "int size not supported"
[188] Fix | Delete
#endif
[189] Fix | Delete
[190] Fix | Delete
#if LONG_MAX == 2147483647
[191] Fix | Delete
# if FFI_LONG_LONG_MAX != FFI_64_BIT_MAX
[192] Fix | Delete
#error "no 64-bit data type supported"
[193] Fix | Delete
# endif
[194] Fix | Delete
#elif LONG_MAX != FFI_64_BIT_MAX
[195] Fix | Delete
#error "long size not supported"
[196] Fix | Delete
#endif
[197] Fix | Delete
[198] Fix | Delete
#if LONG_MAX == 2147483647
[199] Fix | Delete
# define ffi_type_ulong ffi_type_uint32
[200] Fix | Delete
# define ffi_type_slong ffi_type_sint32
[201] Fix | Delete
#elif LONG_MAX == FFI_64_BIT_MAX
[202] Fix | Delete
# define ffi_type_ulong ffi_type_uint64
[203] Fix | Delete
# define ffi_type_slong ffi_type_sint64
[204] Fix | Delete
#else
[205] Fix | Delete
#error "long size not supported"
[206] Fix | Delete
#endif
[207] Fix | Delete
[208] Fix | Delete
/* These are defined in types.c. */
[209] Fix | Delete
FFI_EXTERN ffi_type ffi_type_void;
[210] Fix | Delete
FFI_EXTERN ffi_type ffi_type_uint8;
[211] Fix | Delete
FFI_EXTERN ffi_type ffi_type_sint8;
[212] Fix | Delete
FFI_EXTERN ffi_type ffi_type_uint16;
[213] Fix | Delete
FFI_EXTERN ffi_type ffi_type_sint16;
[214] Fix | Delete
FFI_EXTERN ffi_type ffi_type_uint32;
[215] Fix | Delete
FFI_EXTERN ffi_type ffi_type_sint32;
[216] Fix | Delete
FFI_EXTERN ffi_type ffi_type_uint64;
[217] Fix | Delete
FFI_EXTERN ffi_type ffi_type_sint64;
[218] Fix | Delete
FFI_EXTERN ffi_type ffi_type_float;
[219] Fix | Delete
FFI_EXTERN ffi_type ffi_type_double;
[220] Fix | Delete
FFI_EXTERN ffi_type ffi_type_pointer;
[221] Fix | Delete
FFI_EXTERN ffi_type ffi_type_longdouble;
[222] Fix | Delete
[223] Fix | Delete
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
[224] Fix | Delete
FFI_EXTERN ffi_type ffi_type_complex_float;
[225] Fix | Delete
FFI_EXTERN ffi_type ffi_type_complex_double;
[226] Fix | Delete
FFI_EXTERN ffi_type ffi_type_complex_longdouble;
[227] Fix | Delete
#endif
[228] Fix | Delete
#endif /* LIBFFI_HIDE_BASIC_TYPES */
[229] Fix | Delete
[230] Fix | Delete
typedef enum {
[231] Fix | Delete
FFI_OK = 0,
[232] Fix | Delete
FFI_BAD_TYPEDEF,
[233] Fix | Delete
FFI_BAD_ABI,
[234] Fix | Delete
FFI_BAD_ARGTYPE
[235] Fix | Delete
} ffi_status;
[236] Fix | Delete
[237] Fix | Delete
typedef struct {
[238] Fix | Delete
ffi_abi abi;
[239] Fix | Delete
unsigned nargs;
[240] Fix | Delete
ffi_type **arg_types;
[241] Fix | Delete
ffi_type *rtype;
[242] Fix | Delete
unsigned bytes;
[243] Fix | Delete
unsigned flags;
[244] Fix | Delete
#ifdef FFI_EXTRA_CIF_FIELDS
[245] Fix | Delete
FFI_EXTRA_CIF_FIELDS;
[246] Fix | Delete
#endif
[247] Fix | Delete
} ffi_cif;
[248] Fix | Delete
[249] Fix | Delete
/* ---- Definitions for the raw API -------------------------------------- */
[250] Fix | Delete
[251] Fix | Delete
#ifndef FFI_SIZEOF_ARG
[252] Fix | Delete
# if LONG_MAX == 2147483647
[253] Fix | Delete
# define FFI_SIZEOF_ARG 4
[254] Fix | Delete
# elif LONG_MAX == FFI_64_BIT_MAX
[255] Fix | Delete
# define FFI_SIZEOF_ARG 8
[256] Fix | Delete
# endif
[257] Fix | Delete
#endif
[258] Fix | Delete
[259] Fix | Delete
#ifndef FFI_SIZEOF_JAVA_RAW
[260] Fix | Delete
# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG
[261] Fix | Delete
#endif
[262] Fix | Delete
[263] Fix | Delete
typedef union {
[264] Fix | Delete
ffi_sarg sint;
[265] Fix | Delete
ffi_arg uint;
[266] Fix | Delete
float flt;
[267] Fix | Delete
char data[FFI_SIZEOF_ARG];
[268] Fix | Delete
void* ptr;
[269] Fix | Delete
} ffi_raw;
[270] Fix | Delete
[271] Fix | Delete
#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8
[272] Fix | Delete
/* This is a special case for mips64/n32 ABI (and perhaps others) where
[273] Fix | Delete
sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */
[274] Fix | Delete
typedef union {
[275] Fix | Delete
signed int sint;
[276] Fix | Delete
unsigned int uint;
[277] Fix | Delete
float flt;
[278] Fix | Delete
char data[FFI_SIZEOF_JAVA_RAW];
[279] Fix | Delete
void* ptr;
[280] Fix | Delete
} ffi_java_raw;
[281] Fix | Delete
#else
[282] Fix | Delete
typedef ffi_raw ffi_java_raw;
[283] Fix | Delete
#endif
[284] Fix | Delete
[285] Fix | Delete
[286] Fix | Delete
FFI_API
[287] Fix | Delete
void ffi_raw_call (ffi_cif *cif,
[288] Fix | Delete
void (*fn)(void),
[289] Fix | Delete
void *rvalue,
[290] Fix | Delete
ffi_raw *avalue);
[291] Fix | Delete
[292] Fix | Delete
FFI_API void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
[293] Fix | Delete
FFI_API void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
[294] Fix | Delete
FFI_API size_t ffi_raw_size (ffi_cif *cif);
[295] Fix | Delete
[296] Fix | Delete
/* This is analogous to the raw API, except it uses Java parameter
[297] Fix | Delete
packing, even on 64-bit machines. I.e. on 64-bit machines longs
[298] Fix | Delete
and doubles are followed by an empty 64-bit word. */
[299] Fix | Delete
[300] Fix | Delete
#if !FFI_NATIVE_RAW_API
[301] Fix | Delete
FFI_API
[302] Fix | Delete
void ffi_java_raw_call (ffi_cif *cif,
[303] Fix | Delete
void (*fn)(void),
[304] Fix | Delete
void *rvalue,
[305] Fix | Delete
ffi_java_raw *avalue) __attribute__((deprecated));
[306] Fix | Delete
#endif
[307] Fix | Delete
[308] Fix | Delete
FFI_API
[309] Fix | Delete
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) __attribute__((deprecated));
[310] Fix | Delete
FFI_API
[311] Fix | Delete
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args) __attribute__((deprecated));
[312] Fix | Delete
FFI_API
[313] Fix | Delete
size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated));
[314] Fix | Delete
[315] Fix | Delete
/* ---- Definitions for closures ----------------------------------------- */
[316] Fix | Delete
[317] Fix | Delete
#if FFI_CLOSURES
[318] Fix | Delete
[319] Fix | Delete
#ifdef _MSC_VER
[320] Fix | Delete
__declspec(align(8))
[321] Fix | Delete
#endif
[322] Fix | Delete
typedef struct {
[323] Fix | Delete
#if 0
[324] Fix | Delete
void *trampoline_table;
[325] Fix | Delete
void *trampoline_table_entry;
[326] Fix | Delete
#else
[327] Fix | Delete
union {
[328] Fix | Delete
char tramp[FFI_TRAMPOLINE_SIZE];
[329] Fix | Delete
void *ftramp;
[330] Fix | Delete
};
[331] Fix | Delete
#endif
[332] Fix | Delete
ffi_cif *cif;
[333] Fix | Delete
void (*fun)(ffi_cif*,void*,void**,void*);
[334] Fix | Delete
void *user_data;
[335] Fix | Delete
#if defined(_MSC_VER) && defined(_M_IX86)
[336] Fix | Delete
void *padding;
[337] Fix | Delete
#endif
[338] Fix | Delete
} ffi_closure
[339] Fix | Delete
#ifdef __GNUC__
[340] Fix | Delete
__attribute__((aligned (8)))
[341] Fix | Delete
#endif
[342] Fix | Delete
;
[343] Fix | Delete
[344] Fix | Delete
#ifndef __GNUC__
[345] Fix | Delete
# ifdef __sgi
[346] Fix | Delete
# pragma pack 0
[347] Fix | Delete
# endif
[348] Fix | Delete
#endif
[349] Fix | Delete
[350] Fix | Delete
FFI_API void *ffi_closure_alloc (size_t size, void **code);
[351] Fix | Delete
FFI_API void ffi_closure_free (void *);
[352] Fix | Delete
[353] Fix | Delete
FFI_API ffi_status
[354] Fix | Delete
ffi_prep_closure (ffi_closure*,
[355] Fix | Delete
ffi_cif *,
[356] Fix | Delete
void (*fun)(ffi_cif*,void*,void**,void*),
[357] Fix | Delete
void *user_data)
[358] Fix | Delete
#if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 405)
[359] Fix | Delete
__attribute__((deprecated ("use ffi_prep_closure_loc instead")))
[360] Fix | Delete
#elif defined(__GNUC__) && __GNUC__ >= 3
[361] Fix | Delete
__attribute__((deprecated))
[362] Fix | Delete
#endif
[363] Fix | Delete
;
[364] Fix | Delete
[365] Fix | Delete
FFI_API ffi_status
[366] Fix | Delete
ffi_prep_closure_loc (ffi_closure*,
[367] Fix | Delete
ffi_cif *,
[368] Fix | Delete
void (*fun)(ffi_cif*,void*,void**,void*),
[369] Fix | Delete
void *user_data,
[370] Fix | Delete
void *codeloc);
[371] Fix | Delete
[372] Fix | Delete
#ifdef __sgi
[373] Fix | Delete
# pragma pack 8
[374] Fix | Delete
#endif
[375] Fix | Delete
typedef struct {
[376] Fix | Delete
#if 0
[377] Fix | Delete
void *trampoline_table;
[378] Fix | Delete
void *trampoline_table_entry;
[379] Fix | Delete
#else
[380] Fix | Delete
char tramp[FFI_TRAMPOLINE_SIZE];
[381] Fix | Delete
#endif
[382] Fix | Delete
ffi_cif *cif;
[383] Fix | Delete
[384] Fix | Delete
#if !FFI_NATIVE_RAW_API
[385] Fix | Delete
[386] Fix | Delete
/* If this is enabled, then a raw closure has the same layout
[387] Fix | Delete
as a regular closure. We use this to install an intermediate
[388] Fix | Delete
handler to do the translation, void** -> ffi_raw*. */
[389] Fix | Delete
[390] Fix | Delete
void (*translate_args)(ffi_cif*,void*,void**,void*);
[391] Fix | Delete
void *this_closure;
[392] Fix | Delete
[393] Fix | Delete
#endif
[394] Fix | Delete
[395] Fix | Delete
void (*fun)(ffi_cif*,void*,ffi_raw*,void*);
[396] Fix | Delete
void *user_data;
[397] Fix | Delete
[398] Fix | Delete
} ffi_raw_closure;
[399] Fix | Delete
[400] Fix | Delete
typedef struct {
[401] Fix | Delete
#if 0
[402] Fix | Delete
void *trampoline_table;
[403] Fix | Delete
void *trampoline_table_entry;
[404] Fix | Delete
#else
[405] Fix | Delete
char tramp[FFI_TRAMPOLINE_SIZE];
[406] Fix | Delete
#endif
[407] Fix | Delete
[408] Fix | Delete
ffi_cif *cif;
[409] Fix | Delete
[410] Fix | Delete
#if !FFI_NATIVE_RAW_API
[411] Fix | Delete
[412] Fix | Delete
/* If this is enabled, then a raw closure has the same layout
[413] Fix | Delete
as a regular closure. We use this to install an intermediate
[414] Fix | Delete
handler to do the translation, void** -> ffi_raw*. */
[415] Fix | Delete
[416] Fix | Delete
void (*translate_args)(ffi_cif*,void*,void**,void*);
[417] Fix | Delete
void *this_closure;
[418] Fix | Delete
[419] Fix | Delete
#endif
[420] Fix | Delete
[421] Fix | Delete
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*);
[422] Fix | Delete
void *user_data;
[423] Fix | Delete
[424] Fix | Delete
} ffi_java_raw_closure;
[425] Fix | Delete
[426] Fix | Delete
FFI_API ffi_status
[427] Fix | Delete
ffi_prep_raw_closure (ffi_raw_closure*,
[428] Fix | Delete
ffi_cif *cif,
[429] Fix | Delete
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
[430] Fix | Delete
void *user_data);
[431] Fix | Delete
[432] Fix | Delete
FFI_API ffi_status
[433] Fix | Delete
ffi_prep_raw_closure_loc (ffi_raw_closure*,
[434] Fix | Delete
ffi_cif *cif,
[435] Fix | Delete
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
[436] Fix | Delete
void *user_data,
[437] Fix | Delete
void *codeloc);
[438] Fix | Delete
[439] Fix | Delete
#if !FFI_NATIVE_RAW_API
[440] Fix | Delete
FFI_API ffi_status
[441] Fix | Delete
ffi_prep_java_raw_closure (ffi_java_raw_closure*,
[442] Fix | Delete
ffi_cif *cif,
[443] Fix | Delete
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
[444] Fix | Delete
void *user_data) __attribute__((deprecated));
[445] Fix | Delete
[446] Fix | Delete
FFI_API ffi_status
[447] Fix | Delete
ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
[448] Fix | Delete
ffi_cif *cif,
[449] Fix | Delete
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
[450] Fix | Delete
void *user_data,
[451] Fix | Delete
void *codeloc) __attribute__((deprecated));
[452] Fix | Delete
#endif
[453] Fix | Delete
[454] Fix | Delete
#endif /* FFI_CLOSURES */
[455] Fix | Delete
[456] Fix | Delete
#ifdef FFI_GO_CLOSURES
[457] Fix | Delete
[458] Fix | Delete
typedef struct {
[459] Fix | Delete
void *tramp;
[460] Fix | Delete
ffi_cif *cif;
[461] Fix | Delete
void (*fun)(ffi_cif*,void*,void**,void*);
[462] Fix | Delete
} ffi_go_closure;
[463] Fix | Delete
[464] Fix | Delete
FFI_API ffi_status ffi_prep_go_closure (ffi_go_closure*, ffi_cif *,
[465] Fix | Delete
void (*fun)(ffi_cif*,void*,void**,void*));
[466] Fix | Delete
[467] Fix | Delete
FFI_API void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
[468] Fix | Delete
void **avalue, void *closure);
[469] Fix | Delete
[470] Fix | Delete
#endif /* FFI_GO_CLOSURES */
[471] Fix | Delete
[472] Fix | Delete
/* ---- Public interface definition -------------------------------------- */
[473] Fix | Delete
[474] Fix | Delete
FFI_API
[475] Fix | Delete
ffi_status ffi_prep_cif(ffi_cif *cif,
[476] Fix | Delete
ffi_abi abi,
[477] Fix | Delete
unsigned int nargs,
[478] Fix | Delete
ffi_type *rtype,
[479] Fix | Delete
ffi_type **atypes);
[480] Fix | Delete
[481] Fix | Delete
FFI_API
[482] Fix | Delete
ffi_status ffi_prep_cif_var(ffi_cif *cif,
[483] Fix | Delete
ffi_abi abi,
[484] Fix | Delete
unsigned int nfixedargs,
[485] Fix | Delete
unsigned int ntotalargs,
[486] Fix | Delete
ffi_type *rtype,
[487] Fix | Delete
ffi_type **atypes);
[488] Fix | Delete
[489] Fix | Delete
FFI_API
[490] Fix | Delete
void ffi_call(ffi_cif *cif,
[491] Fix | Delete
void (*fn)(void),
[492] Fix | Delete
void *rvalue,
[493] Fix | Delete
void **avalue);
[494] Fix | Delete
[495] Fix | Delete
FFI_API
[496] Fix | Delete
ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
[497] Fix | Delete
size_t *offsets);
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function