[Cython] removing ALL those nasty warnings about string constants
Stefan Behnel
stefan_ml at behnel.de
Fri Dec 19 21:52:41 CET 2008
Lisandro Dalcin wrote:
> On Fri, Dec 19, 2008 at 6:39 PM, Stefan Behnel <stefan_ml at behnel.de> wrote:
>>> #if Py2
>>> #define __Pyx_CHARP(p) ((char*)(p))
>>> #else
>>> #define __Pyx_CHARP(p) (p)
>>> #endif
>>>
>>> What do you think?
>> Fine with me. Whatever you take, the hardest part is to put it where it
>> belongs. Changing the name later on is a simple search&replace.
>
> OK. Some time ago I've already pushed some fixes, but by using an
> explicit (char*) cast. Now I'll revert that to use the __Pyx_CHARP
> macro....
>
> BTW, Python 2.5 is better about those problems than 2.4, with in turns
> is better than 2.3 .... Python 2.3 is probably near to be unsupported
> for some very popular packages, like numpy (funny enough, last time
> I've tried numpy 1.2.1 did not work on 2.3 because of a generator)...
> so the question is: Could I target all those fixes for 2.4 and above?
> If not, I'll have to put the casting macro at ever more places...
+1 These are warnings, there's nothing broken in Cython.
Stefan
More information about the Cython-dev
mailing list