summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2021-03-23 11:31:08 -0400
committerGitHub <noreply@github.com>2021-03-23 11:31:08 -0400
commit205cf01b57972fdc8c090fc79192b464dc43fc0d (patch)
tree7be40eeb5610861a795dc339d5c0dc02ab70d707 /include
parentd271dbe0a8b230e566fa3385babdc9cc0ca214ea (diff)
downloadlibffi-205cf01b57972fdc8c090fc79192b464dc43fc0d.tar.gz
Bug #680. Don't accept floats or small ints as var args. (#628)
* Bug #680. Don't accept floats or small ints as var args. * Bug #680. Don't accept floats or small ints as var args. * Bug #680. Don't accept floats or small ints as var args.
Diffstat (limited to 'include')
-rw-r--r--include/ffi.h.in28
1 files changed, 15 insertions, 13 deletions
diff --git a/include/ffi.h.in b/include/ffi.h.in
index 14ec807..d16f307 100644
--- a/include/ffi.h.in
+++ b/include/ffi.h.in
@@ -1,6 +1,7 @@
/* -----------------------------------------------------------------*-C-*-
- libffi @VERSION@ - Copyright (c) 2011, 2014, 2019 Anthony Green
- - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
+ libffi @VERSION@
+ - Copyright (c) 2011, 2014, 2019, 2021 Anthony Green
+ - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -217,7 +218,8 @@ FFI_EXTERN ffi_type ffi_type_complex_longdouble;
typedef enum {
FFI_OK = 0,
FFI_BAD_TYPEDEF,
- FFI_BAD_ABI
+ FFI_BAD_ABI,
+ FFI_BAD_ARGTYPE
} ffi_status;
typedef struct {
@@ -269,7 +271,7 @@ typedef ffi_raw ffi_java_raw;
#endif
-FFI_API
+FFI_API
void ffi_raw_call (ffi_cif *cif,
void (*fn)(void),
void *rvalue,
@@ -374,8 +376,8 @@ typedef struct {
#if !FFI_NATIVE_RAW_API
- /* If this is enabled, then a raw closure has the same layout
- as a regular closure. We use this to install an intermediate
+ /* If this is enabled, then a raw closure has the same layout
+ as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*);
@@ -400,8 +402,8 @@ typedef struct {
#if !FFI_NATIVE_RAW_API
- /* If this is enabled, then a raw closure has the same layout
- as a regular closure. We use this to install an intermediate
+ /* If this is enabled, then a raw closure has the same layout
+ as a regular closure. We use this to install an intermediate
handler to do the translation, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*);
@@ -462,7 +464,7 @@ FFI_API void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
/* ---- Public interface definition -------------------------------------- */
-FFI_API
+FFI_API
ffi_status ffi_prep_cif(ffi_cif *cif,
ffi_abi abi,
unsigned int nargs,
@@ -495,18 +497,18 @@ ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
#endif
/* If these change, update src/mips/ffitarget.h. */
-#define FFI_TYPE_VOID 0
+#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
-#define FFI_TYPE_FLOAT 2
+#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if @HAVE_LONG_DOUBLE@
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
-#define FFI_TYPE_UINT8 5
+#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
-#define FFI_TYPE_UINT16 7
+#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10