summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-21 21:05:24 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-21 21:05:24 +0200
commit5e72b1f4f302e86a75399694d293e09a58d4bdbe (patch)
tree0f72d208c5bdf119f3fde00f21692ac3ce0c20b5 /python
parent6842933fb0b51aaa6fdc66e17b4645312876d0c9 (diff)
downloadpython-apt-5e72b1f4f302e86a75399694d293e09a58d4bdbe.tar.gz
python/generic.h: Define a compat macro PyErr_WarnEx for Python 2.4
Diffstat (limited to 'python')
-rw-r--r--python/generic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/generic.h b/python/generic.h
index a9e6b8bf..4fe1f915 100644
--- a/python/generic.h
+++ b/python/generic.h
@@ -63,6 +63,11 @@ typedef int Py_ssize_t;
#define PyBytes_AsStringAndSize PyString_AsStringAndSize
#endif
+// Hacks to make Python 2.4 build.
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 4
+#define PyErr_WarnEx(cat,msg,stacklevel) PyErr_Warn(cat,msg)
+#endif
+
template <class T> struct CppPyObject : public PyObject
{
// We are only using CppPyObject and friends as dumb structs only, ie the