diff -r 0d2c364c7e5d Modules/_io/bufferedio.c --- a/Modules/_io/bufferedio.c Sat Apr 13 20:12:53 2013 +0300 +++ b/Modules/_io/bufferedio.c Sat Apr 13 14:31:12 2013 -0400 @@ -2263,9 +2263,14 @@ static PyObject * _forward_call(buffered *self, _Py_Identifier *name, PyObject *args) { - PyObject *func = _PyObject_GetAttrId((PyObject *)self, name); - PyObject *ret; + PyObject *func, *ret; + if (self == NULL) { + PyErr_SetString(PyExc_RuntimeError, + "the BufferedRWPair has not been initialized"); + return NULL; + } + func = _PyObject_GetAttrId((PyObject *)self, name); if (func == NULL) { PyErr_SetString(PyExc_AttributeError, name->string); return NULL;

AltStyle によって変換されたページ (->オリジナル) /