[Cython] cdef-enums-stucts-and-unions progress update

2011-03-03 Thread W. Trevor King
Done: * Cleaned all overloaded visibilities out of Parsing and Symtab. * Merged current trunk. Todo: * Remove older Symtab interface so I can remove the WTK_* methods. * Activate `shadow` functionality (via AnalyseDeclarationsTransform.visit_CStructOrUnionDefNode()). Feel free to comment via

Re: [Cython] "__ipow__ has wrong number of arguments" is back here

2011-03-03 Thread Lisandro Dalcin
On 3 March 2011 18:05, Robert Bradshaw wrote: > On Wed, Mar 2, 2011 at 5:47 PM, Lisandro Dalcin wrote: >> >> BTW, do you all agree with this change? > > To summarize, the C signature of ipow takes three arguments, but the > third is often/always garbage, so we shouldn't use it? > Yes. >> I expe

Re: [Cython] "__ipow__ has wrong number of arguments" is back here

2011-03-03 Thread Robert Bradshaw
On Wed, Mar 2, 2011 at 5:47 PM, Lisandro Dalcin wrote: > On 2 March 2011 17:14, Lisandro Dalcin wrote: >> On 2 March 2011 16:18, Vitja Makarov wrote: >>> Hi! >>> >>> I noticed that this error came back again. >>> >>> https://sage.math.washington.edu:8091/hudson/view/cython-devel/job/cython-devel

Re: [Cython] strange bug in starred target

2011-03-03 Thread Robert Bradshaw
On Thu, Mar 3, 2011 at 11:44 AM, Vitja Makarov wrote: > 2011/3/3 Vitja Makarov : >> 2011/3/3 Vitja Makarov : >>> This doesn't work: >>> def assign(): >>>    a, *b = 1,2,3,4,5 >>>    return a, b >>> >> import x >> x.assign() >>> Traceback (most recent call last): >>>  File "", line 1, in >

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread Greg Ewing
Lisandro Dalcin wrote: However, in Python 3 that is not te case (and only for the .so, for .py is the same as in Py2), the import machinery adds the entry later, after the finalization of the module init function. Might be an idea to raise this issue on python-dev, to see if there is a reason f

Re: [Cython] strange bug in starred target

2011-03-03 Thread Vitja Makarov
2011/3/3 Vitja Makarov : > 2011/3/3 Vitja Makarov : >> This doesn't work: >> def assign(): >>    a, *b = 1,2,3,4,5 >>    return a, b >> > import x > x.assign() >> Traceback (most recent call last): >>  File "", line 1, in >>  File "x.pyx", line 6, in x.assign (x.c:445) >>    a, *b = 1,2,3,

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread Robert Bradshaw
On Thu, Mar 3, 2011 at 1:59 AM, Stefan Behnel wrote: > Vitja Makarov, 03.03.2011 10:48: >> >> To share common sources is a good idea, we can also share "code" in >> libcython-.so >> But then we should handle ABI compatibility problems. > > There is little constant code overlap between modules, and

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-03-03 Thread Robert Bradshaw
On Thu, Mar 3, 2011 at 4:13 AM, W. Trevor King wrote: > On Wed, Mar 02, 2011 at 06:08:12PM -0800, Robert Bradshaw wrote: >> On Wed, Mar 2, 2011 at 5:54 PM, W. Trevor King wrote: >> > Previous discussions in this thread [1,2] have discussed the issues >> > associated with overloading the 'public'

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-03-03 Thread W. Trevor King
On Wed, Mar 02, 2011 at 06:08:12PM -0800, Robert Bradshaw wrote: > On Wed, Mar 2, 2011 at 5:54 PM, W. Trevor King wrote: > > Previous discussions in this thread [1,2] have discussed the issues > > associated with overloading the 'public' keyword. For an example of > > the difficulties this causes

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread Stefan Behnel
Vitja Makarov, 03.03.2011 10:48: To share common sources is a good idea, we can also share "code" in libcython-.so But then we should handle ABI compatibility problems. There is little constant code overlap between modules, and putting that into a separate library would lead to performance reg

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread Stefan Behnel
mark florisson, 03.03.2011 10:32: On 3 March 2011 07:43, Stefan Behnel wrote: Lisandro Dalcin, 03.03.2011 05:38: On 2 March 2011 21:01, Greg Ewing wrote: Stefan Behnel wrote: you'd call "cython" on a package and it would output a directory with a single __init__.so that contains the module

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread mark florisson
On 3 March 2011 10:48, Vitja Makarov wrote: > 2011/3/3 mark florisson : >> On 3 March 2011 07:43, Stefan Behnel wrote: >>> Lisandro Dalcin, 03.03.2011 05:38: On 2 March 2011 21:01, Greg Ewing  wrote: > > Stefan Behnel wrote: >> >> you'd call "cython" on a package and it

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread Vitja Makarov
2011/3/3 mark florisson : > On 3 March 2011 07:43, Stefan Behnel wrote: >> Lisandro Dalcin, 03.03.2011 05:38: >>> >>> On 2 March 2011 21:01, Greg Ewing  wrote: Stefan Behnel wrote: > > you'd call "cython" on a package and it would output a directory with a > single __init__.s

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread mark florisson
On 3 March 2011 07:43, Stefan Behnel wrote: > Lisandro Dalcin, 03.03.2011 05:38: >> >> On 2 March 2011 21:01, Greg Ewing  wrote: >>> >>> Stefan Behnel wrote: you'd call "cython" on a package and it would output a directory with a single __init__.so that contains the modules compiled