[Cython] "__pyx_dynamic_args" undeclared in fused types code

mark florisson markflorisson88 at gmail.com
Wed Jun 13 17:26:05 CEST 2012


On Jun 12, 2012 8:15 PM, "Stefan Behnel" <stefan_ml at behnel.de> wrote:
>
> Hi,
>
> after the merge of the "_fused_dispatch_rebased" branch, I get C compile
> errors in a simple fused types example:
>
> """
> from cython cimport integral
>
> # define a fused type for different containers
> ctypedef fused container:
>    list
>    tuple
>    object
>
> # define a generic function using the above types
> cpdef sum(container items, integral start = 0):
>    cdef integral item, result
>    result = start
>    for item in items:
>        result += item
>    return result
>
> def test():
>    cdef int x = 1, y = 2
>
>    # call [list,int] specialisation implicitly
>    print( sum([1,2,3,4], x) )
>
>    # calls [object,long] specialisation explicitly
>    print( sum[object,long]([1,2,3,4], y) )
> """
>
> The C compiler complains that "__pyx_dynamic_args" is undeclared -
> supposedly something should have been passed into the function but wasn't.
>
> Mark, could you take a look?
>
> Stefan
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel

Thanks for pointing that out Stefan, I'll get that fixed for 0.17.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20120613/967dfbd4/attachment.html>


More information about the cython-devel mailing list