summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2007-08-12 11:44:53 (GMT)
committerSkip Montanaro <skip@pobox.com>2007-08-12 11:44:53 (GMT)
commit46fc337395753e5b927f6dcccc549c54550b197e (patch)
tree36c450714b34d4ee7f5ae1d1490d4a1ecac254e8 /Modules/mmapmodule.c
parent447e7c398158323af7757def0cf715fabfc707fa (diff)
downloadcpython-46fc337395753e5b927f6dcccc549c54550b197e.zip
cpython-46fc337395753e5b927f6dcccc549c54550b197e.tar.gz
cpython-46fc337395753e5b927f6dcccc549c54550b197e.tar.bz2
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
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 269ac90..1626d72 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);