ffi_type *args[1];
void *values[1];
char *s;
- int rc;
+ ffi_arg rc;
/* Initialize the argument info vectors */
args[0] = &ffi_type_pointer;
/* Initialize the cif */
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
- &ffi_type_uint, args) == FFI_OK)
+ &ffi_type_sint, args) == FFI_OK)
{
s = "Hello World!";
ffi_call(&cif, puts, &rc, values);
int i;
tm_type.size = tm_type.alignment = 0;
+ tm_type.type = FFI_TYPE_STRUCT;
tm_type.elements = &tm_type_elements;
for (i = 0; i < 9; i++)
#include <ffi.h>
/* Acts like puts with the file given at time of enclosure. */
- void puts_binding(ffi_cif *cif, unsigned int *ret, void* args[],
+ void puts_binding(ffi_cif *cif, ffi_arg *ret, void* args[],
FILE *stream)
{
*ret = fputs(*(char **)args[0], stream);
/* Initialize the cif */
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
- &ffi_type_uint, args) == FFI_OK)
+ &ffi_type_sint, args) == FFI_OK)
{
/* Initialize the closure, setting stream to stdout */
if (ffi_prep_closure_loc(closure, &cif, puts_binding,
Node: Using libffi\7f3061
Node: The Basics\7f3547
Node: Simple Example\7f7198
-Node: Types\7f8225
-Node: Primitive Types\7f8508
-Node: Structures\7f10329
-Node: Type Example\7f11203
-Node: Multiple ABIs\7f12426
-Node: The Closure API\7f12797
-Node: Closure Example\7f15741
-Node: Missing Features\7f17300
-Node: Index\7f17753
+Node: Types\7f8229
+Node: Primitive Types\7f8512
+Node: Structures\7f10333
+Node: Type Example\7f11207
+Node: Multiple ABIs\7f12473
+Node: The Closure API\7f12844
+Node: Closure Example\7f15788
+Node: Missing Features\7f17342
+Node: Index\7f17795
\1f
End Tag Table
ffi_type *args[1];
void *values[1];
char *s;
- int rc;
+ ffi_arg rc;
/* Initialize the argument info vectors */
args[0] = &ffi_type_pointer;
/* Initialize the cif */
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
- &ffi_type_uint, args) == FFI_OK)
+ &ffi_type_sint, args) == FFI_OK)
@{
s = "Hello World!";
ffi_call(&cif, puts, &rc, values);
int i;
tm_type.size = tm_type.alignment = 0;
+ tm_type.type = FFI_TYPE_STRUCT;
tm_type.elements = &tm_type_elements;
for (i = 0; i < 9; i++)
#include <ffi.h>
/* Acts like puts with the file given at time of enclosure. */
-void puts_binding(ffi_cif *cif, unsigned int *ret, void* args[],
+void puts_binding(ffi_cif *cif, ffi_arg *ret, void* args[],
FILE *stream)
@{
*ret = fputs(*(char **)args[0], stream);
/* Initialize the cif */
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
- &ffi_type_uint, args) == FFI_OK)
+ &ffi_type_sint, args) == FFI_OK)
@{
/* Initialize the closure, setting stream to stdout */
if (ffi_prep_closure_loc(closure, &cif, puts_binding,