Skip to content

Commit b241cd4

Browse files
committed
add writable method
1 parent d37a8c6 commit b241cd4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/isal/isal_zlib.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class _GzipReader():
6868
def __init__(self, fp: typing.BinaryIO, buffersize: int = 32 * 1024): ...
6969
def readinto(self, obj) -> int: ...
7070
def readable(self) -> bool: ...
71+
def writable(self) -> bool: ...
7172
def seekable(self) -> bool: ...
7273
def tell(self) -> int: ...
7374
def seek(self, offset: int, whence: int): ...

src/isal/isal_zlibmodule.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,12 @@ GzipReader_readable(GzipReader *self, PyObject *Py_UNUSED(ignore))
17731773
Py_RETURN_TRUE;
17741774
}
17751775

1776+
static PyObject *
1777+
GzipReader_writable(GzipReader *self, PyObject *Py_UNUSED(ignore))
1778+
{
1779+
Py_RETURN_TRUE;
1780+
}
1781+
17761782
static PyObject *
17771783
GzipReader_seekable(GzipReader *self, PyObject *Py_UNUSED(ignore)) {
17781784
return PyObject_CallMethod(self->fp, "seekable", NULL);
@@ -1806,6 +1812,7 @@ GzipReader_get_closed(GzipReader *self, void *Py_UNUSED(closure))
18061812
static PyMethodDef GzipReader_methods[] = {
18071813
{"readinto", (PyCFunction)GzipReader_readinto, METH_O, NULL},
18081814
{"readable", (PyCFunction)GzipReader_readable, METH_NOARGS, NULL},
1815+
{"writable", (PyCFunction)GzipReader_writable, METH_NOARGS, NULL},
18091816
{"seekable", (PyCFunction)GzipReader_seekable, METH_NOARGS, NULL},
18101817
{"tell", (PyCFunction)GzipReader_tell, METH_NOARGS, NULL},
18111818
{"seek", (PyCFunction)GzipReader_seek, METH_VARARGS | METH_KEYWORDS, NULL},

0 commit comments

Comments
 (0)