Back to index

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

Go to the source code of this file.


static long return_sl (long l1, long l2)
int main (void)

Function Documentation

int main ( void  )

Definition at line 14 of file return_sl.c.

  ffi_cif cif;
  ffi_type *args[MAX_ARGS];
  void *values[MAX_ARGS];
  ffi_arg res;
  unsigned long l1, l2;

  args[0] = &ffi_type_slong;
  args[1] = &ffi_type_slong;
  values[0] = &l1;
  values[1] = &l2;

  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2,
                   &ffi_type_slong, args) == FFI_OK);

  l1 = 1073741823L;
  l2 = 1073741824L;

  ffi_call(&cif, FFI_FN(return_sl), &res, values);
  printf("res: %ld, %ld\n", (long)res, l1 - l2);
  /* { dg-output "res: -1, -1" } */


Here is the call graph for this function:

static long return_sl ( long  l1,
long  l2 
) [static]

Definition at line 9 of file return_sl.c.

  return l1 - l2;

Here is the caller graph for this function: