summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-04 22:42:43 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-04 22:42:43 (GMT)
commitce5faf673e9b11f2e56baa41ee0664c632ce1d55 (patch)
tree33b98a6969cc01701ae03e49e9909c4a1ce926a7
parent55a190fbbddea150498a06351c66170c0a4a51bf (diff)
downloadcpython-ce5faf673e9b11f2e56baa41ee0664c632ce1d55.zip
cpython-ce5faf673e9b11f2e56baa41ee0664c632ce1d55.tar.gz
cpython-ce5faf673e9b11f2e56baa41ee0664c632ce1d55.tar.bz2
unicodeobject.c doesn't make output strings ready in debug mode
Try to only create non ready strings in debug mode to ensure that all functions (not only in unicodeobject.c, everywhere) make input strings ready.
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 4e05490..56bd7b7 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -46,6 +46,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <windows.h>
#endif
+#ifdef Py_DEBUG
+# define DONT_MAKE_RESULT_READY
+#endif
+
/* Limit for the Unicode object free list */
#define PyUnicode_MAXFREELIST 1024