]> granicus.if.org Git - python/commitdiff
Move PyUnicode_WCHAR_KIND outside PyUnicode_Kind enum
authorVictor Stinner <victor.stinner@haypocalc.com>
Sat, 17 Dec 2011 21:18:27 +0000 (22:18 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sat, 17 Dec 2011 21:18:27 +0000 (22:18 +0100)
Include/unicodeobject.h

index c5480f1b46fe1c439092b457e8772184123d7e87..60bfcbe5ca9cad94ba546d2f373306f7c410fe14 100644 (file)
@@ -445,12 +445,13 @@ PyAPI_DATA(PyTypeObject) PyUnicodeIter_Type;
 #define PyUnicode_IS_COMPACT_ASCII(op)                 \
     (((PyASCIIObject*)op)->state.ascii && PyUnicode_IS_COMPACT(op))
 
-enum PyUnicode_Kind {
 /* String contains only wstr byte characters.  This is only possible
    when the string was created with a legacy API and _PyUnicode_Ready()
    has not been called yet.  */
-    PyUnicode_WCHAR_KIND = 0,
-/* Return values of the PyUnicode_KIND() macro: */
+#define PyUnicode_WCHAR_KIND 0
+
+/* Return values of the PyUnicode_KIND() macro */
+enum PyUnicode_Kind {
     PyUnicode_1BYTE_KIND = 1,
     PyUnicode_2BYTE_KIND = 2,
     PyUnicode_4BYTE_KIND = 4