From cf7d705308a4cde15c5be7747e3ebeb8f731ab4a Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 27 Nov 2009 16:18:44 +0100 Subject: [PATCH] test case for #408 --- tests/bugs.txt | 1 + tests/run/cfunc_call_tuple_args_T408.pyx | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/run/cfunc_call_tuple_args_T408.pyx diff --git a/tests/bugs.txt b/tests/bugs.txt index 49ba73eb..f0269ae5 100644 --- a/tests/bugs.txt +++ b/tests/bugs.txt @@ -7,3 +7,4 @@ numpy_ValueError_T172 unsignedbehaviour_T184 missing_baseclass_in_predecl_T262 tp_new_T454 +cfunc_call_tuple_args_T408 diff --git a/tests/run/cfunc_call_tuple_args_T408.pyx b/tests/run/cfunc_call_tuple_args_T408.pyx new file mode 100644 index 00000000..eddf68ce --- /dev/null +++ b/tests/run/cfunc_call_tuple_args_T408.pyx @@ -0,0 +1,17 @@ +__doc__ = """ +>>> call_with_tuple(1, 1.2, 'test', [1,2,3]) +(1, 1.2, 'test', [1, 2, 3]) + +>>> call_with_list(1, 1.2, None, None) +(1, 1.2, None, None) +""" + +cdef c_function(int a, float b, c, list d): + return a,b,c,d + +def call_with_tuple(*args): + return c_function(*args) + +def call_with_list(*args): + args = list(args) + return c_function(*args) -- 2.26.2