mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Get rid of more uses of string and use unicode
This commit is contained in:
parent
841e122f0e
commit
bed678449f
7 changed files with 18 additions and 21 deletions
|
|
@ -1882,7 +1882,7 @@ _PyExc_Init(void)
|
|||
(PyBaseExceptionObject *)PyExc_RecursionErrorInst;
|
||||
PyObject *args_tuple;
|
||||
PyObject *exc_message;
|
||||
exc_message = PyString_FromString("maximum recursion depth exceeded");
|
||||
exc_message = PyUnicode_FromString("maximum recursion depth exceeded");
|
||||
if (!exc_message)
|
||||
Py_FatalError("cannot allocate argument for RuntimeError "
|
||||
"pre-allocation");
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ map_to_dict(PyObject *map, Py_ssize_t nmap, PyObject *dict, PyObject **values,
|
|||
for (j = nmap; --j >= 0; ) {
|
||||
PyObject *key = PyTuple_GET_ITEM(map, j);
|
||||
PyObject *value = values[j];
|
||||
assert(PyString_Check(key)/*XXX this should go*/ || PyUnicode_Check(key));
|
||||
assert(PyUnicode_Check(key));
|
||||
if (deref) {
|
||||
assert(PyCell_Check(value));
|
||||
value = PyCell_GET(value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue