diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-01-31 23:31:20 -0800 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2017-01-31 23:31:20 -0800 |
commit | 75a56cd1847142d9c893b6df5fb674f54b34d9ed (patch) | |
tree | 73d254a7d8ed4bc2f76293a2b2e223c3f48e7dd4 /Modules/_ctypes/libffi/testsuite/libffi.call/cls_uchar_va.c | |
parent | bff21dc9e43eaf9549abe72a32d98a6c20de8c5b (diff) | |
parent | fcd15724f28a5249f13690af32dc12628ab186c6 (diff) | |
download | cpython-75a56cd1847142d9c893b6df5fb674f54b34d9ed.tar.gz |
merge 3.6 (#29398)
Diffstat (limited to 'Modules/_ctypes/libffi/testsuite/libffi.call/cls_uchar_va.c')
-rw-r--r-- | Modules/_ctypes/libffi/testsuite/libffi.call/cls_uchar_va.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/Modules/_ctypes/libffi/testsuite/libffi.call/cls_uchar_va.c b/Modules/_ctypes/libffi/testsuite/libffi.call/cls_uchar_va.c deleted file mode 100644 index 6491c5b3df..0000000000 --- a/Modules/_ctypes/libffi/testsuite/libffi.call/cls_uchar_va.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Area: closure_call - Purpose: Test anonymous unsigned char argument. - Limitations: none. - PR: none. - Originator: ARM Ltd. */ - -/* { dg-do run } */ -#include "ffitest.h" - -typedef unsigned char T; - -static void cls_ret_T_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, - void* userdata __UNUSED__) - { - *(ffi_arg *)resp = *(T *)args[0]; - - printf("%d: %d %d\n", (int)(*(ffi_arg *)resp), *(T *)args[0], *(T *)args[1]); - } - -typedef T (*cls_ret_T)(T, ...); - -int main (void) -{ - ffi_cif cif; - void *code; - ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code); - ffi_type * cl_arg_types[3]; - T res; - - cl_arg_types[0] = &ffi_type_uchar; - cl_arg_types[1] = &ffi_type_uchar; - cl_arg_types[2] = NULL; - - /* Initialize the cif */ - CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 1, 2, - &ffi_type_uchar, cl_arg_types) == FFI_OK); - - CHECK(ffi_prep_closure_loc(pcl, &cif, cls_ret_T_fn, NULL, code) == FFI_OK); - res = ((((cls_ret_T)code)(67, 4))); - /* { dg-output "67: 67 4" } */ - printf("res: %d\n", res); - /* { dg-output "\nres: 67" } */ - exit(0); -} |