summaryrefslogtreecommitdiff
path: root/python/generic.h
diff options
context:
space:
mode:
Diffstat (limited to 'python/generic.h')
-rw-r--r--python/generic.h5
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.