mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Replace PyObject_Unicode with PyObject_Str everywhere, and remove the
#define for PyObject_Unicode in object.h.
This commit is contained in:
parent
6e8ea0fd9c
commit
519a042c7c
13 changed files with 25 additions and 26 deletions
|
|
@ -552,7 +552,7 @@ MultibyteCodec_Encode(MultibyteCodecObject *self,
|
|||
if (PyUnicode_Check(arg))
|
||||
ucvt = NULL;
|
||||
else {
|
||||
arg = ucvt = PyObject_Unicode(arg);
|
||||
arg = ucvt = PyObject_Str(arg);
|
||||
if (arg == NULL)
|
||||
return NULL;
|
||||
else if (!PyUnicode_Check(arg)) {
|
||||
|
|
@ -728,7 +728,7 @@ encoder_encode_stateful(MultibyteStatefulEncoderContext *ctx,
|
|||
if (PyUnicode_Check(unistr))
|
||||
ucvt = NULL;
|
||||
else {
|
||||
unistr = ucvt = PyObject_Unicode(unistr);
|
||||
unistr = ucvt = PyObject_Str(unistr);
|
||||
if (unistr == NULL)
|
||||
return NULL;
|
||||
else if (!PyUnicode_Check(unistr)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue