mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Get rid of all #ifdef Py_USING_UNICODE (it is always present now).
(With the help of unifdef from freshmeat.)
This commit is contained in:
parent
938ef57e26
commit
8d30cc0144
36 changed files with 10 additions and 472 deletions
|
@ -1183,7 +1183,6 @@ SimpleExtendsException(PyExc_StandardError, ValueError,
|
|||
SimpleExtendsException(PyExc_ValueError, UnicodeError,
|
||||
"Unicode related error.");
|
||||
|
||||
#ifdef Py_USING_UNICODE
|
||||
static int
|
||||
get_int(PyObject *attr, Py_ssize_t *value, const char *name)
|
||||
{
|
||||
|
@ -1788,7 +1787,6 @@ PyUnicodeTranslateError_Create(
|
|||
return PyObject_CallFunction(PyExc_UnicodeTranslateError, "u#nns",
|
||||
object, length, start, end, reason);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1989,11 +1987,9 @@ _PyExc_Init(void)
|
|||
PRE_INIT(KeyError)
|
||||
PRE_INIT(ValueError)
|
||||
PRE_INIT(UnicodeError)
|
||||
#ifdef Py_USING_UNICODE
|
||||
PRE_INIT(UnicodeEncodeError)
|
||||
PRE_INIT(UnicodeDecodeError)
|
||||
PRE_INIT(UnicodeTranslateError)
|
||||
#endif
|
||||
PRE_INIT(AssertionError)
|
||||
PRE_INIT(ArithmeticError)
|
||||
PRE_INIT(FloatingPointError)
|
||||
|
@ -2051,11 +2047,9 @@ _PyExc_Init(void)
|
|||
POST_INIT(KeyError)
|
||||
POST_INIT(ValueError)
|
||||
POST_INIT(UnicodeError)
|
||||
#ifdef Py_USING_UNICODE
|
||||
POST_INIT(UnicodeEncodeError)
|
||||
POST_INIT(UnicodeDecodeError)
|
||||
POST_INIT(UnicodeTranslateError)
|
||||
#endif
|
||||
POST_INIT(AssertionError)
|
||||
POST_INIT(ArithmeticError)
|
||||
POST_INIT(FloatingPointError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue