Robert Bradshaw wrote:
> On May 14, 2009, at 6:06 AM, Dag Sverre Seljebotn wrote:
> 
>> Robert Bradshaw wrote:
>>> On May 14, 2009, at 2:06 AM, Stefan Behnel wrote:
>>>
>>>> Robert Bradshaw wrote:
>>>>> I just pushed a series of patches to http://hg.cython.org/cython-
>>>>> devel/ for complex number support. See
>>>>>
>>>>> http://hg.cython.org/cython-devel/file/5c014b865386/tests/run/
>>>>> complex_numbers_T305.pyx .
>>>>>
>>>>> Despite being a rather large change, and shortly before a  
>>>>> release, it
>>>>> belongs in -devel because this is one of the motivations to do a
>>>>> release so soon.
>>>> Does it (potentially) break any existing stuff or is it a plain new
>>>> feature?
>>> It's a plain new feature, though I did have to touch a lot of code.
>>>
>>>> The latter would make it easy to say: "Sure, let's release it; if  
>>>> the
>>>> feature is broken in some way, there will be a fix release."
>> OK I've looked at it and it looks sweet! Buffer support added, it  
>> was a
>> three line change :-) [1]
> 
> Just saw it, that was fast. Does this still work with the complex.h  
> header turned on as well (I don't see you using the __Pyx_REAL_PART  
> macros).

The (marginal) tests work, both with and without complex.h.

Basically all that needs to be done is to accept the format string, and 
a cast of a pointer; the actual access happen through 
(__pyx_..complex*)(bufferptr).

So the links in the C99 spec pretty much takes care of it all, as the 
buffer pointer can just be casted then as well.

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to