On Wed, Oct 5, 2011 at 3:41 PM, Greg Ewing wrote:
> Robert Bradshaw wrote:
>
>> On this note, eventually I would like coerce structs (and unions,
>> enums) to auto-generated wrapper classes, visible in the Python module
>> namespace if one declares them as "cpdef struct ..."
>
> Would these wrappe
Robert Bradshaw wrote:
On this note, eventually I would like coerce structs (and unions,
enums) to auto-generated wrapper classes, visible in the Python module
namespace if one declares them as "cpdef struct ..."
Would these wrapper classes contain a copy of the struct,
or would they reference
On Fri, Sep 30, 2011 at 2:14 PM, 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.
+1
> It bothers me th
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
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
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
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
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
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