diff -r 5bad73fbf593 Misc/ACKS --- a/Misc/ACKS Sun Apr 29 09:25:25 2012 -0700 +++ b/Misc/ACKS Mon Apr 30 10:14:09 2012 +0200 @@ -833,6 +833,7 @@ Geoff Talvola William Tanksley Christian Tanzer +Stefano Taschini Steven Taschuk Monty Taylor Amy Taylor diff -r 5bad73fbf593 Objects/object.c --- a/Objects/object.c Sun Apr 29 09:25:25 2012 -0700 +++ b/Objects/object.c Mon Apr 30 10:14:09 2012 +0200 @@ -2111,8 +2111,10 @@ if (PyType_Ready(&PySet_Type) < 0) Py_FatalError("Can't initialize set type"); +#ifdef Py_USING_UNICODE if (PyType_Ready(&PyUnicode_Type) < 0) Py_FatalError("Can't initialize unicode type"); +#endif if (PyType_Ready(&PySlice_Type) < 0) Py_FatalError("Can't initialize slice type"); diff -r 5bad73fbf593 Python/bltinmodule.c --- a/Python/bltinmodule.c Sun Apr 29 09:25:25 2012 -0700 +++ b/Python/bltinmodule.c Mon Apr 30 10:14:09 2012 +0200 @@ -1578,6 +1578,7 @@ Py_CLEAR(str_newline); return NULL; } +#ifdef Py_USING_UNICODE unicode_newline = PyUnicode_FromString("\n"); if (unicode_newline == NULL) { Py_CLEAR(str_newline); @@ -1591,6 +1592,7 @@ Py_CLEAR(unicode_space); return NULL; } +#endif } if (!PyArg_ParseTupleAndKeywords(dummy_args, kwds, "|OOO:print", kwlist, &sep, &end, &file)) diff -r 5bad73fbf593 Python/peephole.c --- a/Python/peephole.c Sun Apr 29 09:25:25 2012 -0700 +++ b/Python/peephole.c Mon Apr 30 10:14:09 2012 +0200 @@ -135,6 +135,7 @@ will return a surrogate. In both the cases skip the optimization in order to produce compatible pycs. */ +#ifdef Py_USING_UNICODE if (newconst != NULL && PyUnicode_Check(v) && PyUnicode_Check(newconst)) { Py_UNICODE ch = PyUnicode_AS_UNICODE(newconst)[0]; @@ -147,6 +148,7 @@ return 0; } } +#endif break; case BINARY_LSHIFT: newconst = PyNumber_Lshift(v, w); diff -r 5bad73fbf593 configure --- a/configure Sun Apr 29 09:25:25 2012 -0700 +++ b/configure Mon Apr 30 10:14:09 2012 +0200 @@ -12522,6 +12522,7 @@ $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h ;; +no) ;; # To allow --disable-unicode *) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;; esac diff -r 5bad73fbf593 configure.ac --- a/configure.ac Sun Apr 29 09:25:25 2012 -0700 +++ b/configure.ac Mon Apr 30 10:14:09 2012 +0200 @@ -3776,6 +3776,7 @@ ucs4) unicode_size="4" AC_DEFINE(Py_UNICODE_SIZE,4) ;; +no) ;; # To allow --disable-unicode *) AC_MSG_ERROR([invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase).]) ;; esac