summaryrefslogtreecommitdiff
path: root/src/qpdf/pikepdf.h
diff options
context:
space:
mode:
authorJames R. Barlow <james@purplerock.ca>2021-08-23 03:38:33 -0700
committerJames R. Barlow <james@purplerock.ca>2021-08-23 03:38:33 -0700
commitb576d02b4b96b1dc9077d670528709ec1840c5f7 (patch)
treef0b9a6b3a3f0a9a1034c9e3e40c238767fb341ea /src/qpdf/pikepdf.h
parent8cbb99616b08d2b5722ee4029db6b061d3dc5e14 (diff)
Deprecation warning: use direct API
Diffstat (limited to 'src/qpdf/pikepdf.h')
-rw-r--r--src/qpdf/pikepdf.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qpdf/pikepdf.h b/src/qpdf/pikepdf.h
index 1ce9660..72a9786 100644
--- a/src/qpdf/pikepdf.h
+++ b/src/qpdf/pikepdf.h
@@ -301,10 +301,7 @@ inline char *fix_pypy36_const_char(const char *s)
inline void deprecation_warning(const char *msg)
{
- py::object warn = py::module_::import("warnings").attr("warn");
- py::object DeprecationWarning =
- py::module_::import("builtins").attr("DeprecationWarning");
- warn(msg, DeprecationWarning, /*stackleverl=*/1);
+ PyErr_WarnEx(PyExc_DeprecationWarning, msg, /*stacklevel=*/1);
}
// Support for recursion checks