summaryrefslogtreecommitdiff
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index 269ac900b4..1626d726a7 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -998,8 +998,9 @@ new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
XXX: fileno == 0 is a valid fd, but was accepted prior to 2.5.
XXX: Should this code be added?
if (fileno == 0)
- PyErr_Warn(PyExc_DeprecationWarning,
- "don't use 0 for anonymous memory");
+ PyErr_WarnEx(PyExc_DeprecationWarning,
+ "don't use 0 for anonymous memory",
+ 1);
*/
if (fileno != -1 && fileno != 0) {
fh = (HANDLE)_get_osfhandle(fileno);