summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-03 23:19:21 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-03 23:19:21 +0200
commit8cfcbed4e3858e84426e606f18f87b5f3b4572fd (patch)
tree71d6169a4d75362afea04e14fd53266451c2d900 /Objects/unicodeobject.c
parent77bb47b3125d271408642505cbc4edd074eb7f1c (diff)
downloadcpython-git-8cfcbed4e3858e84426e606f18f87b5f3b4572fd.tar.gz
Improve string forms and PyUnicode_Resize() documentation
Remove also the FIXME for resize_copy(): as discussed with Martin, copy the string on resize if the string is not resizable is just fine.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 46332fbb81..cb4813f902 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -536,7 +536,8 @@ resize_copy(PyObject *unicode, Py_ssize_t length)
return NULL;
}
return copy;
- } else {
+ }
+ else {
PyUnicodeObject *w;
assert(_PyUnicode_WSTR(unicode) != NULL);
assert(_PyUnicode_DATA_ANY(unicode) == NULL);
@@ -1294,7 +1295,6 @@ unicode_resize(PyObject **p_unicode, Py_ssize_t length)
if (old_length == length)
return 0;
- /* FIXME: really create a new object? */
if (!unicode_resizable(unicode)) {
PyObject *copy = resize_copy(unicode, length);
if (copy == NULL)