< prev index next > modules/javafx.media/src/main/native/gstreamer/3rd_party/libffi/src/raw_api.c
Print this page
/* This file defines generic functions for use with the raw api. */
#include <ffi.h>
#include <ffi_common.h>
+ #ifdef GSTREAMER_LITE
+ #include <string.h>
+ #endif // GSTREAMER_LITE
+
#if !FFI_NO_RAW_API
size_t
ffi_raw_size (ffi_cif *cif)
{
for (i = cif->nargs-1; i >= 0; i--, at++)
{
#if !FFI_NO_STRUCTS
if ((*at)->type == FFI_TYPE_STRUCT)
- result += ALIGN (sizeof (void*), FFI_SIZEOF_ARG);
+ result += FFI_ALIGN (sizeof (void*), FFI_SIZEOF_ARG);
else
#endif
- result += ALIGN ((*at)->size, FFI_SIZEOF_ARG);
+ result += FFI_ALIGN ((*at)->size, FFI_SIZEOF_ARG);
}
return result;
}
*args = (void*) &(raw++)->ptr;
break;
default:
*args = raw;
- raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
+ raw += FFI_ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
}
}
#else /* WORDS_BIGENDIAN */
*args = (raw++)->ptr;
}
else
{
*args = (void*) raw;
- raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*);
+ raw += FFI_ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*);
}
}
#else
#error "pdp endian not supported"
(raw++)->ptr = **(void***) args;
break;
default:
memcpy ((void*) raw->data, (void*)*args, (*tp)->size);
- raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
+ raw += FFI_ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
}
}
}
#if !FFI_NATIVE_RAW_API
< prev index next >