diff options
Diffstat (limited to 'ext/ffi_c/libffi/src/sh')
-rw-r--r-- | ext/ffi_c/libffi/src/sh/ffi.c | 7 | ||||
-rw-r--r-- | ext/ffi_c/libffi/src/sh/ffitarget.h | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ext/ffi_c/libffi/src/sh/ffi.c b/ext/ffi_c/libffi/src/sh/ffi.c index 69bd025..9ec86bf 100644 --- a/ext/ffi_c/libffi/src/sh/ffi.c +++ b/ext/ffi_c/libffi/src/sh/ffi.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Kaz Kojima + ffi.c - Copyright (c) 2002-2008, 2012 Kaz Kojima Copyright (c) 2008 Red Hat, Inc. SuperH Foreign Function Interface @@ -41,7 +41,7 @@ #define STRUCT_VALUE_ADDRESS_WITH_ARG 0 #endif -/* If the structure has essentialy an unique element, return its type. */ +/* If the structure has essentially an unique element, return its type. */ static int simple_type (ffi_type *arg) { @@ -463,7 +463,8 @@ ffi_prep_closure_loc (ffi_closure* closure, unsigned int *tramp; unsigned int insn; - FFI_ASSERT (cif->abi == FFI_GCC_SYSV); + if (cif->abi != FFI_SYSV) + return FFI_BAD_ABI; tramp = (unsigned int *) &closure->tramp[0]; /* Set T bit if the function returns a struct pointed with R2. */ diff --git a/ext/ffi_c/libffi/src/sh/ffitarget.h b/ext/ffi_c/libffi/src/sh/ffitarget.h index 4f1f639..a36bf42 100644 --- a/ext/ffi_c/libffi/src/sh/ffitarget.h +++ b/ext/ffi_c/libffi/src/sh/ffitarget.h @@ -1,5 +1,6 @@ /* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + ffitarget.h - Copyright (c) 2012 Anthony Green + Copyright (c) 1996-2003 Red Hat, Inc. Target configuration macros for SuperH. Permission is hereby granted, free of charge, to any person obtaining @@ -27,6 +28,10 @@ #ifndef LIBFFI_TARGET_H #define LIBFFI_TARGET_H +#ifndef LIBFFI_H +#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." +#endif + /* ---- Generic type definitions ----------------------------------------- */ #ifndef LIBFFI_ASM |