Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Commit

Permalink
rename setbit into setbit_ to fix possible conflict during compilatio…
Browse files Browse the repository at this point in the history
…n. release v3.1.2
  • Loading branch information
Cylix committed Mar 7, 2017
1 parent b87abcd commit d0ac8be
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions includes/cpp_redis/future_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion includes/cpp_redis/redis_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions includes/cpp_redis/sync_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion sources/redis_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d0ac8be

Please sign in to comment.