Back to index

python3.2  3.2.2
err_bad_abi.c File Reference
#include "ffitest.h"

Go to the source code of this file.


static void dummy_fn (ffi_cif *cif __UNUSED__, void *resp __UNUSED__, void **args __UNUSED__, void *userdata __UNUSED__)
int main (void)

Function Documentation

static void dummy_fn ( ffi_cif *cif  __UNUSED__,
void *resp  __UNUSED__,
void **args  __UNUSED__,
void *userdata  __UNUSED__ 
) [static]

Definition at line 11 of file err_bad_abi.c.


Here is the caller graph for this function:

int main ( void  )

Definition at line 15 of file err_bad_abi.c.

       ffi_cif cif;
        void *code;
       ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
       void* args[1];
       ffi_type* arg_types[1];

       arg_types[0] = NULL;
       args[0] = NULL;

       CHECK(ffi_prep_cif(&cif, 255, 0, &ffi_type_void,
              arg_types) == FFI_BAD_ABI);

       CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &ffi_type_void,
              arg_types) == FFI_OK);

       cif.abi= 255;

       CHECK(ffi_prep_closure_loc(pcl, &cif, dummy_fn, NULL, code) == FFI_BAD_ABI);


Here is the call graph for this function: