Le 04/10/2011 01:34, benjamin.peterson a écrit :
http://hg.python.org/cpython/rev/afb60b190f1c
changeset: 72633:afb60b190f1c
user:Benjamin Petersonbenja...@python.org
date:Mon Oct 03 19:34:12 2011 -0400
summary:
fix compiler warnings
+++ b/Objects/unicodeobject.c
@@ -369,6
2011/10/4 Victor Stinner victor.stin...@haypocalc.com:
Le 04/10/2011 01:34, benjamin.peterson a écrit :
http://hg.python.org/cpython/rev/afb60b190f1c
changeset: 72633:afb60b190f1c
user: Benjamin Petersonbenja...@python.org
date: Mon Oct 03 19:34:12 2011 -0400
summary:
fix
Why does the function even return a value? As Benjamin said, it is just a
bunch of asserts with return 1 at the end.
I believe another way you can get rid of statement with no effect is to
cast return value to void, like (void)_PyUnicode_CHECK(unicode).
Thank you,
Vlad
On Tue, Oct 4, 2011 at
Le 05/10/2011 00:30, Vlad Riscutia a écrit :
Why does the function even return a value? As Benjamin said, it is just
a bunch of asserts with return 1 at the end.
It's just to be able to write assert(_PyUnicode_CheckConsistency(...)).
assert() is just used to remove the instruction in release