diff options
| author | Julian Andres Klode <jak@debian.org> | 2013-10-23 19:38:48 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2013-10-23 19:38:48 +0200 |
| commit | ea815d93dda86504518bdf69488b1f336f2439a3 (patch) | |
| tree | 76b2899f7ef8913392b8994fc7592292a7402624 /python/generic.h | |
| parent | 0d616ec4ef49064412b27275dbbb1cb04b546fb5 (diff) | |
| download | python-apt-ea815d93dda86504518bdf69488b1f336f2439a3.tar.gz | |
python/{depcache.cc,string.cc}: Ignore deprecation warnings for some calls
Those functions are deprecated in APT, but we still need to provide them
for backwards compatibility.
Diffstat (limited to 'python/generic.h')
| -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 c9db916c..26736f1a 100644 --- a/python/generic.h +++ b/python/generic.h @@ -75,6 +75,11 @@ typedef int Py_ssize_t; #define PyErr_WarnEx(cat,msg,stacklevel) PyErr_Warn(cat,msg) #endif +#define PY_APT_BEGIN_DEPRECATED { \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\""); } +#define PY_APT_END_DEPRECATED _Pragma("GCC diagnostic pop") + static inline const char *PyUnicode_AsString(PyObject *op) { // Convert to bytes object, using the default encoding. |
