On Tue, Mar 24, 2009 at 3:49 PM, Dag Sverre Seljebotn
<[email protected]> wrote:
> Lisandro Dalcin wrote:
>> Stefan, I'm currently very busy trying to get a new release of two of
>> my projects...
>>
>> My original patch still needs a bit of discussion, and there is room
>> for improvement, as I want to extend that machinery to "extern
>> ctypedef" integrals in such a way that Cython stop assuming a base
>> type and instead emit a custom conversor.
>
> Excellent! As you probably know the buffer interface already does not
> make such assumptions.
>

Yes, of course :-)

> So basically,
>
> cdef extern:
>     ctypedef short a
>     ctypedef long b
>
> here, a and b should always be treated in the exact same way by Cython? +1!
>

Yes, but you still will need to specify signed(default)/unsigned.

> I think we should include floats though, so that the size of float vs.
> long double isn't assumed for external typedefs as well.
>

Well... I believe floats are different beasts. Python can only handle
'double', there is no a flexible floating like PyLong for integers...
I do not want to enter "Decimal" terrain. We should discuss at some
point what to do with all this...

-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to