[python-committers] python 3.0 compilation warning in Objects/stringlib/find.h

Christian Heimes christian at cheimes.de
Thu Aug 28 13:24:38 CEST 2008


Amaury Forgeot d'Arc wrote:
> Hello,
> 
> r65977 was not correctly merged into py3k; I get the following
> compilation warning:
> 
> Objects/stringlib/find.h:93:36: warning: extra tokens at end of #ifdef directive
> 
> And indeed, the line
> 
> #ifdef STRINGLIB_WANT_CONTAINS_OBJ && !defined(FROM_BYTEARRAY)
> 
> does not seem correct. I suppose the "#ifdef" could be replaced by
> "#if defined",
> but I'm not sure to understand the code. The symbol seems not to be
> defined anywhere...

At first I thought it's my fault. I added the FROM_BYTEARRAY macro to 
stringlib/find.h and bytearrayobject.c a while ago. It was necessary in 
order to get rid of a compiler warning in bytearrayobject.c. However I 
added the macro only to the trunk.

The code was ported to the py3k branch although it isn't necessary. You 
can safely remove the check for FROM_BYTEARRAY.

Christian




More information about the python-committers mailing list