From ea815d93dda86504518bdf69488b1f336f2439a3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 23 Oct 2013 19:38:48 +0200 Subject: 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. --- python/generic.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python/generic.h') 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. -- cgit v1.2.3