[Python-checkins] cpython (merge default -> default): merge heads

benjamin.peterson python-checkins at python.org
Tue Sep 11 18:05:26 CEST 2012


http://hg.python.org/cpython/rev/8042b87bb762
changeset:   78995:8042b87bb762
parent:      78994:6cdc72f4d82c
parent:      78993:59ec0b9ff724
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Sep 11 12:05:18 2012 -0400
summary:
  merge heads

files:
  Python/structmember.c |  6 +-----
  1 files changed, 1 insertions(+), 5 deletions(-)


diff --git a/Python/structmember.c b/Python/structmember.c
--- a/Python/structmember.c
+++ b/Python/structmember.c
@@ -254,12 +254,8 @@
         char *string;
         Py_ssize_t len;
 
-        if (!PyUnicode_Check(v)) {
-            PyErr_BadArgument();
-            return -1;
-        }
         string = _PyUnicode_AsStringAndSize(v, &len);
-        if (len != 1) {
+        if (string == NULL || len != 1) {
             PyErr_BadArgument();
             return -1;
         }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list