From 65b3c8442fdf7102f741ae0e98d4216878846b07 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 12 Sep 2023 10:48:02 +0530 Subject: [PATCH] Revert ABI breakage in kiwix::Downloader::getDownloadIds() Changing it to be `const` is an ABI change since the symbol changes from `_ZN5...` to `_ZNK5...` (addition of "K"). The other changes made in 18b7b5f27 are probably fine to keep since they don't appear to be used from what I can tell. Fixes https://github.com/kiwix/libkiwix/issues/998. --- include/downloader.h | 2 +- src/downloader.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/downloader.h b/include/downloader.h index bfa1746c5..f8651d32b 100644 --- a/include/downloader.h +++ b/include/downloader.h @@ -204,7 +204,7 @@ class Downloader /** * Get the ids of the managed downloads. */ - std::vector getDownloadIds() const; + std::vector getDownloadIds(); private: mutable std::mutex m_lock; diff --git a/src/downloader.cpp b/src/downloader.cpp index f09e644ee..228555798 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -157,7 +157,7 @@ void Downloader::close() mp_aria->close(); } -std::vector Downloader::getDownloadIds() const { +std::vector Downloader::getDownloadIds() { std::unique_lock lock(m_lock); std::vector ret; for(auto& p:m_knownDownloads) {