summaryrefslogtreecommitdiff
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index fdce783fde..2311840e22 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -746,8 +746,7 @@ mmap__enter__method(mmap_object *self, PyObject *args)
{
CHECK_VALID(NULL);
- Py_INCREF(self);
- return (PyObject *)self;
+ return Py_NewRef(self);
}
static PyObject *