From 4be2f3604939de8589dd2206fdf3d1a85033f171 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 24 Apr 2022 09:31:32 -0400 Subject: Deprecate replaceOrRemoveKey -- it's the same as replaceKey --- include/qpdf/QPDFObjectHandle.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index ffffe523..3beab3f5 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1023,13 +1023,16 @@ class QPDFObjectHandle // Mutator methods for dictionary objects - // Replace value of key, adding it if it does not exist + // Replace value of key, adding it if it does not exist. If value + // is null, remove the key. QPDF_DLL - void replaceKey(std::string const& key, QPDFObjectHandle const&); + void replaceKey(std::string const& key, QPDFObjectHandle const& value); // Remove key, doing nothing if key does not exist QPDF_DLL void removeKey(std::string const& key); - // If the object is null, remove the key. Otherwise, replace it. + + // ABI: Remove in qpdf 12 + [[deprecated("use replaceKey -- it does the same thing")]] QPDF_DLL void replaceOrRemoveKey(std::string const& key, QPDFObjectHandle const&); -- cgit v1.2.3-54-g00ecf