]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
unicodeobject.c doesn't make output strings ready in debug mode
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 4 Oct 2011 22:42:43 +0000 (00:42 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 4 Oct 2011 22:42:43 +0000 (00:42 +0200)
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.

Objects/unicodeobject.c

index 4e05490431fabb1b82698ea1aa3c04ae58090aa4..56bd7b77a88b5ed3df6cf22d7c997d7c8e230b95 100644 (file)
@@ -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