[Cython] "__pyx_dynamic_args" undeclared in fused types code

Stefan Behnel stefan_ml at behnel.de
Tue Jun 12 16:13:03 CEST 2012


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


More information about the cython-devel mailing list