[Python-checkins] r68449 - sandbox/trunk/io-c/_textio.c
antoine.pitrou
python-checkins at python.org
Fri Jan 9 13:14:23 CET 2009
Author: antoine.pitrou
Date: Fri Jan 9 13:14:23 2009
New Revision: 68449
Log:
Revert last commit, it was useless (shared strings always has a refcount > 1)
Modified:
sandbox/trunk/io-c/_textio.c
Modified: sandbox/trunk/io-c/_textio.c
==============================================================================
--- sandbox/trunk/io-c/_textio.c (original)
+++ sandbox/trunk/io-c/_textio.c Fri Jan 9 13:14:23 2009
@@ -225,9 +225,7 @@
PyObject *translated = NULL;
Py_UNICODE *out_str;
Py_ssize_t out;
- /* 1-character strings may be shared, and we may be the first
- to receive a reference (although unlikely). */
- if (Py_REFCNT(output) != 1 || len < 2) {
+ if (Py_REFCNT(output) != 1) {
/* We could try to optimize this so that we only do a copy
when there is something to translate. On the other hand,
most decoders should only output non-shared strings, i.e.
More information about the Python-checkins
mailing list