Alexey Suda-Chen added the comment:

Oops, i see there are two bugs. Previously i have fixed multiline
strings only.

I think it will be:

Index: tokenizer.c
===================================================================
--- tokenizer.c (revision 58161)
+++ tokenizer.c (working copy)
@@ -395,6 +395,7 @@
                        goto error;
                buflen = size;
        }
+
        memcpy(s, buf, buflen);
        s[buflen] = '\0';
        if (buflen == 0) /* EOF */
@@ -402,6 +403,12 @@
        if (allocated) {
                Py_DECREF(bufobj);
        }
+
+  if ( bufobj == tok->decoding_buffer ){
+    Py_XDECREF(tok->decoding_buffer);
+    tok->decoding_buffer = 0;
+  }
+
        return s;
 
 error:

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1134>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to