diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-21 21:05:24 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-21 21:05:24 +0200 |
| commit | 5e72b1f4f302e86a75399694d293e09a58d4bdbe (patch) | |
| tree | 0f72d208c5bdf119f3fde00f21692ac3ce0c20b5 /python | |
| parent | 6842933fb0b51aaa6fdc66e17b4645312876d0c9 (diff) | |
| download | python-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.h | 5 |
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 |
