コード例 #1
0
ファイル: iobase.c プロジェクト: Apoorvadabhere/cpython
/* May be called with any object */
PyObject *
_PyIOBase_check_writable(PyObject *self, PyObject *args)
{
    PyObject *res  = PyObject_CallMethodObjArgs(self, _PyIO_str_writable, NULL);
    if (res == NULL)
        return NULL;
    if (res != Py_True) {
        Py_CLEAR(res);
        iobase_unsupported("File or stream is not writable.");
        return NULL;
    }
    if (args == Py_True) {
        Py_DECREF(res);
    }
    return res;
}
コード例 #2
0
ファイル: iobase.c プロジェクト: GINK03/StaticPython
static PyObject *
iobase_seek(PyObject *self, PyObject *args)
{
    return iobase_unsupported("seek");
}
コード例 #3
0
ファイル: iobase.c プロジェクト: GINK03/StaticPython
static PyObject *
iobase_fileno(PyObject *self, PyObject *args)
{
    return iobase_unsupported("fileno");
}
コード例 #4
0
ファイル: iobase.c プロジェクト: GINK03/StaticPython
static PyObject *
iobase_truncate(PyObject *self, PyObject *args)
{
    return iobase_unsupported("truncate");
}
コード例 #5
0
ファイル: iobase.c プロジェクト: Apoorvadabhere/cpython
static PyObject *
_io__IOBase_fileno_impl(PyObject *self)
/*[clinic end generated code: output=7cc0973f0f5f3b73 input=4e37028947dc1cc8]*/
{
    return iobase_unsupported("fileno");
}
コード例 #6
0
ファイル: iobase.c プロジェクト: Alkalit/cpython
static PyObject *
_io__IOBase_fileno_impl(PyObject *self)
/*[clinic end generated code: output=7cc0973f0f5f3b73 input=32773c5df4b7eede]*/
{
    return iobase_unsupported("fileno");
}