diff options
Diffstat (limited to 'Modules/_io/textio.c')
| -rw-r--r-- | Modules/_io/textio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index e222067..2559714 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -2383,6 +2383,14 @@ textiowrapper_isatty(textio *self, PyObject *args) } static PyObject * +textiowrapper_getstate(textio *self, PyObject *args) +{ + PyErr_Format(PyExc_TypeError, + "cannot serialize '%s' object", Py_TYPE(self)->tp_name); + return NULL; +} + +static PyObject * textiowrapper_flush(textio *self, PyObject *args) { CHECK_INITIALIZED(self); @@ -2546,6 +2554,7 @@ static PyMethodDef textiowrapper_methods[] = { {"readable", (PyCFunction)textiowrapper_readable, METH_NOARGS}, {"writable", (PyCFunction)textiowrapper_writable, METH_NOARGS}, {"isatty", (PyCFunction)textiowrapper_isatty, METH_NOARGS}, + {"__getstate__", (PyCFunction)textiowrapper_getstate, METH_NOARGS}, {"seek", (PyCFunction)textiowrapper_seek, METH_VARARGS}, {"tell", (PyCFunction)textiowrapper_tell, METH_NOARGS}, |
