Re: [Cython] CyFunction refactoring plan

2011-09-30 Thread mark florisson
On 30 September 2011 07:47, Vitja Makarov wrote: > 2011/9/30 Vitja Makarov : >> 2011/9/30 Robert Bradshaw : >>> On Thu, Sep 29, 2011 at 10:43 PM, Stefan Behnel wrote: Vitja Makarov, 30.09.2011 06:41: > > 2011/9/28 Vitja Makarov: >> >> I tried to build simple plan for ongoing

Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread mark florisson
On 29 September 2011 22:48, Robert Bradshaw wrote: > On Thu, Sep 29, 2011 at 5:29 AM, mark florisson > wrote: >> On 29 September 2011 13:13, Miguel Angel wrote: Structs already coerce to python dicts. In the memoryview branch it also does the reverse, i.e. coerce a dict to a struc

Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread Dag Sverre Seljebotn
Note: The last field in a C struct can be of variable size, decided at malloc-time. I can't think of a clear syntax for that, except perhaps a builtin function cython.coercevariablesizestruct... Dag Sverre -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. mark florisson

Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread Dag Sverre Seljebotn
Are you saying that when coercing a struct to an object, one would copy scalar fields by value but reference array fields? -1, that would be confusing. Either the whole struct through a view, or copy it all. It bothers me that structs are passed by value in Cython, but it seems impossible to ch

Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread mark florisson
On 30 September 2011 22:14, Dag Sverre Seljebotn wrote: > Are you saying that when coercing a struct to an object, one would copy > scalar fields by value but reference array fields? -1, that would be > confusing. Either the whole struct through a view, or copy it all. Hmm, yeah it might be confu

Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread mark florisson
On 30 September 2011 21:50, Dag Sverre Seljebotn wrote: > Note: The last field in a C struct can be of variable size, decided at > malloc-time. I can't think of a clear syntax for that, except perhaps a > builtin function cython.coercevariablesizestruct... > > > > Dag Sverre > -- > Sent from my An

Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread mark florisson
On 30 September 2011 22:42, mark florisson wrote: > On 30 September 2011 22:14, Dag Sverre Seljebotn > wrote: >> Are you saying that when coercing a struct to an object, one would copy >> scalar fields by value but reference array fields? -1, that would be >> confusing. Either the whole struct th