Home | History | Annotate | Download | only in src

Lines Matching refs:raw

27 /* This file defines generic functions for use with the raw api. */
57 ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args)
70 *args = (void*) ((char*)(raw++) + FFI_SIZEOF_ARG - 1);
75 *args = (void*) ((char*)(raw++) + FFI_SIZEOF_ARG - 2);
81 *args = (void*) ((char*)(raw++) + FFI_SIZEOF_ARG - 4);
87 *args = (raw++)->ptr;
92 *args = (raw++)->ptr;
96 *args = (void*) &(raw++)->ptr;
100 *args = raw;
101 raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
115 *args = (raw++)->ptr;
121 *args = (raw++)->ptr;
125 *args = (void*) raw;
126 raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*);
138 ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
148 (raw++)->uint = *(UINT8*) (*args);
152 (raw++)->sint = *(SINT8*) (*args);
156 (raw++)->uint = *(UINT16*) (*args);
160 (raw++)->sint = *(SINT16*) (*args);
165 (raw++)->uint = *(UINT32*) (*args);
169 (raw++)->sint = *(SINT32*) (*args);
175 (raw++)->ptr = *args;
180 (raw++)->ptr = *args;
184 (raw++)->ptr = **(void***) args;
188 memcpy ((void*) raw->data, (void*)*args, (*tp)->size);
189 raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
199 * Having this, allows code to be written for the raw API, without
204 void ffi_raw_call (ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *raw)
207 ffi_raw_to_ptrarray (cif, raw, avalue);
217 ffi_raw *raw = (ffi_raw*)alloca (ffi_raw_size (cif));
220 ffi_ptrarray_to_raw (cif, avalue, raw);
221 (*cl->fun) (cif, rvalue, raw, cl->user_data);
254 * the pointer-array format, to the raw format */