[Cython] [cython-users] Re: Cython 0.20 beta 1

Stefan Behnel stefan_ml at behnel.de
Tue Jan 7 12:25:20 CET 2014


Hi,

thanks for reporting.

Andreas van Cranenburgh, 07.01.2014 12:02:
> There is a new warning:
> 
>     Non-trivial type declarators in shared declaration.
> 
> It wasn't immediately obvious to me what this means (trivial & shared could 
> be lots of things), but looking at the code it seems to suggest that 
> declarations should be on their own line except for primitive types.

Right. It's meant to prepare a potential switch of the way pointers are
declared, as well as making it less likely to get the declarations wrong. C
is suprisingly relaxed about these things, but Cython shouldn't be.

I guess the message could be improved, though. Maybe add something like
"mix of pointers and values" as a hinting example.


> I also get an error in code with string formatting. Turns out "%s" % foo 
> used to be translated with PyNumber_Remainder, but now it 
> uses __Pyx_PyString_Format with type checking which fails. This is probably 
> an issue in my code (trying to make things work in 2 and 3) but string 
> formatting is not mentioned in the changelog.

I added an entry. Could you provide a code snippet that shows what you were
doing? Just to be sure it's really a problem in your code and not a wrong
assumption in Cython. Optimisations shouldn't break code.

Stefan



More information about the cython-devel mailing list