On 4 November 2011 08:58, Vitja Makarov <vitja.maka...@gmail.com> wrote: > 2011/11/4 mark florisson <markflorisso...@gmail.com>: >>> >>> That's nice. I've also implemented support for dynamic default args >>> >>> http://trac.cython.org/cython_trac/ticket/674 >>> >>> I think it could be merged either. >> >> That's great, because it's a nasty bug. I see no pull request for that >> though, although I see it in one of your branches. Is it ready? >> > > Yeah, you can find it here: > > https://github.com/vitek/cython/commit/175c8994ead619ce8425de8fed96ffa9adb18a88 > > Btw, it needs to be cleaned. Now it packs default args in C struct this way: > > struct defaults { > PyObject *objects[N]; > int int_arg; // C type args here > ... > } > > So perhaps it would be better to pack that into PyObject so it would > be easier to copy default args when creating fused functions.
I don't think we need dynamic default arguments for fused functions (yet), as fused closures are not supported. But if we want those in the future (I don't think we should necessarily support them, especially if you nest fused functions in fused functions you get code explosion) and if it works for CyFunction, it should work for FusedFunction if it simply mangles the struct names. I don't think you should worry about it. > -- > vitja. > _______________________________________________ > cython-devel mailing list > cython-devel@python.org > http://mail.python.org/mailman/listinfo/cython-devel > _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel