summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes/callbacks.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/_ctypes/callbacks.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/_ctypes/callbacks.c')
-rw-r--r--Modules/_ctypes/callbacks.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c
index 5915455..a1a0e0d 100644
--- a/Modules/_ctypes/callbacks.c
+++ b/Modules/_ctypes/callbacks.c
@@ -225,8 +225,9 @@ if (x == NULL) _AddTraceback(what, __FILE__, __LINE__ - 1), PyErr_Print()
else if (keep == Py_None) /* Nothing to keep */
Py_DECREF(keep);
else if (setfunc != getentry("O")->setfunc) {
- if (-1 == PyErr_Warn(PyExc_RuntimeWarning,
- "memory leak in callback function."))
+ if (-1 == PyErr_WarnEx(PyExc_RuntimeWarning,
+ "memory leak in callback function.",
+ 1))
PyErr_WriteUnraisable(callable);
}
}