Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions
ffi.c File Reference
`#include <ffi.h>`
`#include <ffi_common.h>`
`#include <stdlib.h>`
`#include <stdio.h>`

Go to the source code of this file.

## Macros
#define | MAX_GPRARGS 5
#define | MAX_FPRARGS 2
#define | ROUND_SIZE(size) (((size) + 15) & ~15)
#define | FFI390_RET_VOID 0
#define | FFI390_RET_STRUCT 1
#define | FFI390_RET_FLOAT 2
#define | FFI390_RET_DOUBLE 3
#define | FFI390_RET_INT32 4
#define | FFI390_RET_INT64 5

## Functions
void | ffi_closure_helper_SYSV (ffi_closure *, unsigned long *, unsigned long long *, unsigned long *)
void | ffi_call_SYSV (unsigned, extended_cif *, void(*)(unsigned char *, extended_cif *), unsigned, void *, void(*fn)(void))
void | ffi_closure_SYSV (void)
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
ffi_status | ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)

## Macro Definition Documentation

## ◆ FFI390_RET_DOUBLE

#define FFI390_RET_DOUBLE 3

Definition at line 61 of file ffi.c.

## ◆ FFI390_RET_FLOAT

#define FFI390_RET_FLOAT 2

Definition at line 60 of file ffi.c.

## ◆ FFI390_RET_INT32

#define FFI390_RET_INT32 4

Definition at line 62 of file ffi.c.

## ◆ FFI390_RET_INT64

#define FFI390_RET_INT64 5

Definition at line 63 of file ffi.c.

## ◆ FFI390_RET_STRUCT

#define FFI390_RET_STRUCT 1

Definition at line 59 of file ffi.c.

## ◆ FFI390_RET_VOID

#define FFI390_RET_VOID 0

Definition at line 58 of file ffi.c.

## ◆ MAX_FPRARGS

#define MAX_FPRARGS 2

Definition at line 51 of file ffi.c.

## ◆ MAX_GPRARGS

#define MAX_GPRARGS 5

Definition at line 45 of file ffi.c.

## ◆ ROUND_SIZE

#define ROUND_SIZE | ( |  | size | ) | (((size) + 15) & ~15)

Definition at line 55 of file ffi.c.

## Function Documentation

## ◆ ffi_call()

void ffi_call | ( | ffi_cif * | cif,
|  | void(*)(void) | fn,
|  | void * | rvalue,
|  | void ** | avalue
| ) |  |

Definition at line 508 of file ffi.c.

References alloca, extended_cif::avalue, extended_cif::cif, FFI390_RET_STRUCT, FFI390_RET_VOID, FFI_ASSERT, ffi_call_SYSV(), ffi_prep_args(), FFI_SYSV, NULL, and extended_cif::rvalue.

## ◆ ffi_call_SYSV()

void ffi_call_SYSV | ( | unsigned | ,
|  | extended_cif * | ,
|  | void(*)(unsigned char *, extended_cif *) | ,
|  | unsigned | ,
|  | void * | ,
|  | void(*)(void) | fn
| ) |  |

## ◆ ffi_closure_helper_SYSV()

void ffi_closure_helper_SYSV | ( | ffi_closure * | closure,
|  | unsigned long * | p_gpr,
|  | unsigned long long * | p_fpr,
|  | unsigned long * | p_ov
| ) |  |

Definition at line 553 of file ffi.c.

References alloca, FFI390_RET_STRUCT, FFI_TYPE_LONGDOUBLE, i, and ptr.

## ◆ ffi_closure_SYSV()

void ffi_closure_SYSV | ( | void |  | ) |

Definition at line 53 of file ffi.c.

## ◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep | ( | ffi_cif * | cif | ) |

Definition at line 343 of file ffi.c.

References FFI390_RET_DOUBLE, FFI390_RET_FLOAT, FFI390_RET_INT32, FFI390_RET_INT64, FFI390_RET_STRUCT, FFI390_RET_VOID, FFI_ASSERT, FFI_TYPE_LONGDOUBLE, i, and ptr.

## ◆ ffi_prep_closure_loc()

ffi_status ffi_prep_closure_loc | ( | ffi_closure * | closure,
|  | ffi_cif * | cif,
|  | void(*)(ffi_cif *, void *, void **, void *) | fun,
|  | void * | user_data,
|  | void * | codeloc
| ) |  |

Definition at line 758 of file ffi.c.

References ffi_closure_SYSV(), FFI_SYSV, and long.