A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2011-October/113824.html below:

[Python-Dev] [Python-checkins] cpython: fix compiler warnings

[Python-Dev] [Python-checkins] cpython: fix compiler warnings [Python-Dev] [Python-checkins] cpython: fix compiler warningsVictor Stinner victor.stinner at haypocalc.com
Tue Oct 4 11:38:57 CEST 2011
Le 04/10/2011 01:34, benjamin.peterson a écrit :
> http://hg.python.org/cpython/rev/afb60b190f1c
> changeset:   72633:afb60b190f1c
> user:        Benjamin Peterson<benjamin at python.org>
> date:        Mon Oct 03 19:34:12 2011 -0400
> summary:
>    fix compiler warnings
>
> +++ b/Objects/unicodeobject.c
> @@ -369,6 +369,12 @@
>       }
>       return 1;
>   }
> +#else
> +static int
> +_PyUnicode_CheckConsistency(void *op)
> +{
> +    return 1;
> +}
>   #endif

Oh no, please don't do that. Calling _PyUnicode_CheckConsistency() is 
reserved to debug builds. In release mode, we should not check string 
consistency (it would slow down Python).

Yes, there was a warning:

Objects/unicodeobject.c:539:13: warning: statement with no effect
             _PyUnicode_CHECK(unicode);

I added these checks recently to ensure that strings are consistent just 
before exiting (to help me to track down a bug).

The right fix is just to replace _PyUnicode_CHECK(unicode) by 
assert(_PyUnicode_CHECK(unicode)).

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4