OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
-#include "php_psi_stdinc.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# include "php_config.h"
+#endif
#include "context.h"
#include "call.h"
#include "php.h"
#ifdef HAVE_LIBFFI
#include "libffi_compat.h"
+#include "libffi.h"
#if HAVE_INT128
static ffi_type *ffi_type_sint128;
{
ffi_status rc;
struct psi_ffi_context *context = pecalloc(1, sizeof(*context), 1);
+ ffi_abi abi = FFI_DEFAULT_ABI;
+
+#if HAVE_FFI_FASTCALL
+ abi = FFI_FASTCALL;
+#endif
context->params[0] = &ffi_type_pointer;
context->params[1] = &ffi_type_pointer;
- rc = ffi_prep_cif(&context->signature, FFI_DEFAULT_ABI, 2, &ffi_type_void,
+ rc = ffi_prep_cif(&context->signature, abi, 2, &ffi_type_void,
context->params);
if (FFI_OK != rc) {
darg->engine.info = NULL;
darg->engine.type = NULL;
- struct psi_plist *args = NULL;
- struct psi_decl_type *dtype = psi_decl_type_get_real(darg->type);
-
- if (dtype->type == PSI_T_STRUCT) {
- args = dtype->real.strct->args;
- } else if (dtype->type == PSI_T_UNION) {
- args = dtype->real.unn->args;
- }
-
- size_t i = 0;
- struct psi_decl_arg *tmp;
-
- while (psi_plist_get(args, i++, &tmp)) {
- psi_ffi_composite_dtor(C, tmp);
- }
-
psi_plist_free(info->eles);
pefree(info, 1);
}