Skip to content

Commit f38cc90

Browse files
committed
gh-111835: Add seekable method to mmap.mmap
1 parent 11e8348 commit f38cc90

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Modules/mmapmodule.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,14 @@ mmap_seek_method(mmap_object *self, PyObject *args)
737737
return NULL;
738738
}
739739

740+
741+
static PyObject *
742+
mmap_seekable_method(mmap_object *self, PyObject *unused)
743+
{
744+
Py_RETURN_TRUE;
745+
}
746+
747+
740748
static PyObject *
741749
mmap_move_method(mmap_object *self, PyObject *args)
742750
{
@@ -905,6 +913,7 @@ static struct PyMethodDef mmap_object_methods[] = {
905913
{"readline", (PyCFunction) mmap_read_line_method, METH_NOARGS},
906914
{"resize", (PyCFunction) mmap_resize_method, METH_VARARGS},
907915
{"seek", (PyCFunction) mmap_seek_method, METH_VARARGS},
916+
{"seekable", (PyCFunction) mmap_seekable_method, METH_NOARGS},
908917
{"size", (PyCFunction) mmap_size_method, METH_NOARGS},
909918
{"tell", (PyCFunction) mmap_tell_method, METH_NOARGS},
910919
{"write", (PyCFunction) mmap_write_method, METH_VARARGS},

0 commit comments

Comments
 (0)