Re: [Cython] "__pyx_dynamic_args" undeclared in fused types code
On Jun 12, 2012 8:15 PM, "Stefan Behnel" <stefan_ml-KjMAwuNBv5izQB+pC5nmwQ@public.gmane.org> 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-+ZN9ApsXKcEdnm+yROfE0A@public.gmane.org
> http://mail.python.org/mailman/listinfo/cython-devel
Thanks for pointing that out Stefan, I'll get that fixed for 0.17.
<div>
<p><br>
On Jun 12, 2012 8:15 PM, "Stefan Behnel" <<a href="mailto:stefan_ml@..." target="_blank">stefan_ml@...</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> after the merge of the "_fused_dispatch_rebased" branch, I get C compile<br>
> errors in a simple fused types example:<br>
><br>
> """<br>
> from cython cimport integral<br>
><br>
> # define a fused type for different containers<br>
> ctypedef fused container:<br>
> list<br>
> tuple<br>
> object<br>
><br>
> # define a generic function using the above types<br>
> cpdef sum(container items, integral start = 0):<br>
> cdef integral item, result<br>
> result = start<br>
> for item in items:<br>
> result += item<br>
> return result<br>
><br>
> def test():<br>
> cdef int x = 1, y = 2<br>
><br>
> # call [list,int] specialisation implicitly<br>
> print( sum([1,2,3,4], x) )<br>
><br>
> # calls [object,long] specialisation explicitly<br>
> print( sum[object,long]([1,2,3,4], y) )<br>
> """<br>
><br>
> The C compiler complains that "__pyx_dynamic_args" is undeclared -<br>
> supposedly something should have been passed into the function but wasn't.<br>
><br>
> Mark, could you take a look?<br>
><br>
> Stefan<br>
> _______________________________________________<br>
> cython-devel mailing list<br>
> <a href="mailto:cython-devel@..." target="_blank">cython-devel@...</a><br>
> <a href="http://mail.python.org/mailman/listinfo/cython-devel" target="_blank">http://mail.python.org/mailman/listinfo/cython-devel</a></p>
<p>Thanks for pointing that out Stefan, I'll get that fixed for 0.17.</p>
</div>