[Cython] Automatic conversion with fixed-size C arrays

Robert Bradshaw robertwb at gmail.com
Mon Jul 28 18:02:39 CEST 2014


On Sun, Jul 27, 2014 at 9:34 PM, Kurt Smith <kwmsmith at gmail.com> wrote:
> On Thu, Jul 24, 2014 at 9:13 PM, Kurt Smith <kwmsmith at gmail.com> wrote:
>>
>>
>> I'm working on getting the `to_py_function` and `from_py_function`
>> infrastructure to take arguments by reference; right now I'm getting
>> something hacked into place, and I'd appreciate your review to point out the
>> right way (or at least a better way) to do it.
>>
>> Will likely have a PR for you by this weekend.
>
>
> Update: all the pieces are coming together.

Cool.

> I have sorted out all the code
> generation pieces and nearly have a minimal example working, and will have
> something for you to review soon.  From what I can tell, Cython has some
> baked-in assumptions when it comes to assignment statements.  Telling Cython
> that in this case, no, don't assign to something at the C level, instead
> generate a function call and pass in the lvalue by reference takes some
> doing.

Yeah, I'm not too surprised about that.

> I tried to fit things in with Cython's type system and pipelines, but I have
> no doubt that it can be improved to do things the right way.

I'll be happy to take a look.

- Robert


More information about the cython-devel mailing list