Back to index

python3.2  3.2.2
Classes | Defines | Typedefs | Functions
ffi_common.h File Reference
#include <fficonfig.h>

Go to the source code of this file.

Classes

struct  extended_cif

Defines

#define MAYBE_UNUSED
#define memcpy(d, s, n)   bcopy ((s), (d), (n))
#define FFI_ASSERT(x)
#define FFI_ASSERT_AT(x, f, l)
#define FFI_ASSERT_VALID_TYPE(x)
#define ALIGN(v, a)   (((((size_t) (v))-1) | ((a)-1))+1)
#define ALIGN_DOWN(v, a)   (((size_t) (v)) & -a)

Typedefs

typedef unsigned int UINT8 __attribute__ ((__mode__(__QI__)))
typedef float FLOAT32

Functions

char * alloca ()
ffi_status ffi_prep_cif_machdep (ffi_cif *cif)

Class Documentation

struct extended_cif

Definition at line 79 of file ffi_common.h.

Collaboration diagram for extended_cif:
Class Members
void ** avalue
ffi_cif * cif
void * rvalue

Define Documentation

#define ALIGN (   v,
 
)    (((((size_t) (v))-1) | ((a)-1))+1)

Definition at line 72 of file ffi_common.h.

#define ALIGN_DOWN (   v,
 
)    (((size_t) (v)) & -a)

Definition at line 73 of file ffi_common.h.

#define FFI_ASSERT (   x)

Definition at line 67 of file ffi_common.h.

#define FFI_ASSERT_AT (   x,
  f,
 
)

Definition at line 68 of file ffi_common.h.

#define FFI_ASSERT_VALID_TYPE (   x)

Definition at line 69 of file ffi_common.h.

#define MAYBE_UNUSED

Definition at line 27 of file ffi_common.h.

#define memcpy (   d,
  s,
  n 
)    bcopy ((s), (d), (n))

Definition at line 50 of file ffi_common.h.


Typedef Documentation

typedef signed int SINT64 __attribute__((__mode__(__DI__)))

Definition at line 103 of file ffi_common.h.

typedef float FLOAT32

Definition at line 113 of file ffi_common.h.


Function Documentation

char* alloca ( )

Definition at line 111 of file ffi.c.

{
  /* Round the stack up to a multiple of 8 bytes.  This isn't needed 
     everywhere, but it is on some platforms, and it doesn't harm anything
     when it isn't needed.  */
  cif->bytes = (cif->bytes + 7) & ~7;

  /* Set the return type flag */
  switch (cif->rtype->type)
    {
    case FFI_TYPE_VOID:
    case FFI_TYPE_FLOAT:
    case FFI_TYPE_DOUBLE:
      cif->flags = (unsigned) cif->rtype->type;
      break;

    case FFI_TYPE_SINT64:
    case FFI_TYPE_UINT64:
      cif->flags = (unsigned) FFI_TYPE_SINT64;
      break;

    case FFI_TYPE_STRUCT:
      if (cif->rtype->size <= 4)
       /* A Composite Type not larger than 4 bytes is returned in r0.  */
       cif->flags = (unsigned)FFI_TYPE_INT;
      else
       /* A Composite Type larger than 4 bytes, or whose size cannot
          be determined statically ... is stored in memory at an
          address passed [in r0].  */
       cif->flags = (unsigned)FFI_TYPE_STRUCT;
      break;

    default:
      cif->flags = FFI_TYPE_INT;
      break;
    }

  return FFI_OK;
}

Here is the caller graph for this function: