mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
This commit is contained in:
parent
38f44b4a4a
commit
762f93ff2e
37 changed files with 154 additions and 132 deletions
|
@ -408,8 +408,8 @@ stringio_iternext(stringio *self)
|
|||
}
|
||||
else {
|
||||
/* XXX is subclassing StringIO really supported? */
|
||||
line = PyObject_CallMethodObjArgs((PyObject *)self,
|
||||
_PyIO_str_readline, NULL);
|
||||
line = _PyObject_CallMethodNoArgs((PyObject *)self,
|
||||
_PyIO_str_readline);
|
||||
if (line && !PyUnicode_Check(line)) {
|
||||
PyErr_Format(PyExc_OSError,
|
||||
"readline() should have returned a str object, "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue