From: Stefan Behnel Date: Fri, 27 Nov 2009 15:18:44 +0000 (+0100) Subject: test case for #408 X-Git-Tag: 0.12.1~116 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=cf7d705308a4cde15c5be7747e3ebeb8f731ab4a;p=cython.git test case for #408 --- 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)