diff --git a/CHANGELOG.md b/CHANGELOG.md index b529c076..14d0be07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [v3.1.2](https://github.com/Cylix/cpp_redis/releases/tag/3.1.2) +### Changes +* rename the `setbit()` function into `setbit_()` in order to avoid conflict with the standard library macro `setbit` causing compilation error. + +### Additions +* add `send()` method to the `sync_client` and `future_client`. + +### Removals +None + ## [v3.1.1](https://github.com/Cylix/cpp_redis/releases/tag/3.1.1) ### Changes * Fix: subscriber callbacks were sometimes not called due to poll not listening to the appropriate events. Mostly impacted windows as referred in #51, but unix version might also be impacted. Fixed by updating the reference tacopie which contains the fix. @@ -15,7 +25,7 @@ None * Fix: compilation for specific windows compilers concerning atomic variables * Fix: handle correctly array replies with negative size by returning a null reply instead of throwing an invalid format exception * Fix: Bump tacopie version to retrieve a fix concerning gethostbyname() thread-safety issue on unix -* Fix: compilation for programs based on Qt ('slots' conflict) +* Fix: compilation for programs based on Qt ('slots' conflict) ### Additions * Add some overloads for the Z set functions to support floating point values diff --git a/includes/cpp_redis/future_client.hpp b/includes/cpp_redis/future_client.hpp index fdf52326..d1bb30f0 100644 --- a/includes/cpp_redis/future_client.hpp +++ b/includes/cpp_redis/future_client.hpp @@ -669,8 +669,8 @@ class future_client { return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.set_advanced(key, value, ex, ex_sec, px, px_milli, nx, xx, cb); }); } future - setbit(const std::string& key, int offset, const std::string& value) { - return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.setbit(key, offset, value, cb); }); + setbit_(const std::string& key, int offset, const std::string& value) { + return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.setbit_(key, offset, value, cb); }); } future setex(const std::string& key, int seconds, const std::string& value) { diff --git a/includes/cpp_redis/redis_client.hpp b/includes/cpp_redis/redis_client.hpp index 45b73859..a8c73dac 100644 --- a/includes/cpp_redis/redis_client.hpp +++ b/includes/cpp_redis/redis_client.hpp @@ -226,7 +226,7 @@ class redis_client { redis_client& select(int index, const reply_callback_t& reply_callback = nullptr); redis_client& set(const std::string& key, const std::string& value, const reply_callback_t& reply_callback = nullptr); redis_client& set_advanced(const std::string& key, const std::string& value, bool ex = false, int ex_sec = 0, bool px = false, int px_milli = 0, bool nx = false, bool xx = false, const reply_callback_t& reply_callback = nullptr); - redis_client& setbit(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback = nullptr); + redis_client& setbit_(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback = nullptr); redis_client& setex(const std::string& key, int seconds, const std::string& value, const reply_callback_t& reply_callback = nullptr); redis_client& setnx(const std::string& key, const std::string& value, const reply_callback_t& reply_callback = nullptr); redis_client& setrange(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback = nullptr); diff --git a/includes/cpp_redis/sync_client.hpp b/includes/cpp_redis/sync_client.hpp index 3444d0d0..ad9c56b8 100644 --- a/includes/cpp_redis/sync_client.hpp +++ b/includes/cpp_redis/sync_client.hpp @@ -646,8 +646,8 @@ class sync_client { return m_client.set_advanced(key, value, ex, ex_sec, px, px_milli, nx, xx).get(); } reply - setbit(const std::string& key, int offset, const std::string& value) { - return m_client.setbit(key, offset, value).get(); + setbit_(const std::string& key, int offset, const std::string& value) { + return m_client.setbit_(key, offset, value).get(); } reply setex(const std::string& key, int seconds, const std::string& value) { diff --git a/sources/redis_client.cpp b/sources/redis_client.cpp index 724ac381..95ff3ba3 100644 --- a/sources/redis_client.cpp +++ b/sources/redis_client.cpp @@ -1147,7 +1147,7 @@ redis_client::set_advanced(const std::string& key, const std::string& value, boo } redis_client& -redis_client::setbit(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback) { +redis_client::setbit_(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback) { send({"SETBIT", key, std::to_string(offset), value}, reply_callback); return *this; }