Ruby
2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
ext
fiddle
libffi-3.2.1
testsuite
libffi.call
err_bad_typedef.c
Go to the documentation of this file.
1
/* Area: ffi_prep_cif
2
Purpose: Test error return for bad typedefs.
3
Limitations: none.
4
PR: none.
5
Originator: Blake Chaffin 6/6/2007 */
6
7
/* { dg-do run } */
8
9
#include "
ffitest.h
"
10
11
int
main
(
void
)
12
{
13
ffi_cif cif;
14
ffi_type* arg_types[1];
15
16
ffi_type badType =
ffi_type_void
;
17
18
arg_types[0] =
NULL
;
19
20
badType.size = 0;
21
22
CHECK
(
ffi_prep_cif
(&cif,
FFI_DEFAULT_ABI
, 0, &badType,
23
arg_types) == FFI_BAD_TYPEDEF);
24
25
exit
(0);
26
}
main
int main(void)
Definition:
err_bad_typedef.c:11
NULL
#define NULL
Definition:
_sdbm.c:101
exit
void exit(int __status) __attribute__((__noreturn__))
ffitest.h
ffi_type_void
const ffi_type ffi_type_void
Definition:
types.c:63
CHECK
#define CHECK(sub)
Definition:
compile.c:448
FFI_DEFAULT_ABI
@ FFI_DEFAULT_ABI
Definition:
ffitarget.h:38
ffi_prep_cif
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_type *rtype, ffi_type **atypes)
Definition:
prep_cif.c:226
Generated by
1.8.17