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 = (void*) &(raw++)->ptr;
96 *args = raw;
97 raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
111 *args = (raw++)->ptr;
116 *args = (void*) raw;
117 raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*);
129 ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
139 (raw++)->uint = *(UINT8*) (*args);
143 (raw++)->sint = *(SINT8*) (*args);
147 (raw++)->uint = *(UINT16*) (*args);
151 (raw++)->sint = *(SINT16*) (*args);
156 (raw++)->uint = *(UINT32*) (*args);
160 (raw++)->sint = *(SINT32*) (*args);
166 (raw++)->ptr = *args;
171 (raw++)->ptr = **(void***) args;
175 memcpy ((void*) raw->data, (void*)*args, (*tp)->size);
176 raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
186 * Having this, allows code to be written for the raw API, without
191 void ffi_raw_call (ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *raw)
194 ffi_raw_to_ptrarray (cif, raw, avalue);
204 ffi_raw *raw = (ffi_raw*)alloca (ffi_raw_size (cif));
207 ffi_ptrarray_to_raw (cif, avalue, raw);
208 (*cl->fun) (cif, rvalue, raw, cl->user_data);
241 * the pointer-array format, to the raw format */