Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13954)

Unified Diff: Modules/mmapmodule.c

Issue 26335: Make mmap.write return the number of bytes written like other write methods
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Lib/test/test_mmap.py ('K') | « Lib/test/test_mmap.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
index bb98a99..28a6b83 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -408,7 +408,7 @@ mmap_write_method(mmap_object *self,
self->pos = self->pos + data.len;
PyBuffer_Release(&data);
Py_INCREF(Py_None);
berkerpeksag 2016/02/23 00:57:52 This can be removed now.
- return Py_None;
+ return PyLong_FromSsize_t(data.len);
berkerpeksag 2016/02/23 00:57:52 We need to save the value of ``data.len`` before t
}
static PyObject *
« Lib/test/test_mmap.py ('K') | « Lib/test/test_mmap.py ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+