]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
make switch more robust
authorBenjamin Peterson <benjamin@python.org>
Sun, 1 Jan 2012 21:56:20 +0000 (15:56 -0600)
committerBenjamin Peterson <benjamin@python.org>
Sun, 1 Jan 2012 21:56:20 +0000 (15:56 -0600)
Objects/unicodeobject.c

index 4756df7db268861a9c7fa519cac2bda34661bf5a..3d8c8952f3764005c25c165c7a6d49a65169e92e 100644 (file)
@@ -9799,10 +9799,11 @@ PyUnicode_Join(PyObject *separator, PyObject *seq)
             for (; i_ < (length); ++i_, ++to_) *to_ = (value); \
             break; \
         } \
-        default: { \
+        case PyUnicode_4BYTE_KIND: { \
             Py_UCS4 * to_ = (Py_UCS4 *)((data)) + (start); \
             for (; i_ < (length); ++i_, ++to_) *to_ = (value); \
             break; \
+        default: assert(0); \
         } \
         } \
     } while (0)