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

Commit d0ac8be

Browse files
committed
rename setbit into setbit_ to fix possible conflict during compilation. release v3.1.2
1 parent b87abcd commit d0ac8be

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [v3.1.2](https://github.com/Cylix/cpp_redis/releases/tag/3.1.2)
4+
### Changes
5+
* rename the `setbit()` function into `setbit_()` in order to avoid conflict with the standard library macro `setbit` causing compilation error.
6+
7+
### Additions
8+
* add `send()` method to the `sync_client` and `future_client`.
9+
10+
### Removals
11+
None
12+
313
## [v3.1.1](https://github.com/Cylix/cpp_redis/releases/tag/3.1.1)
414
### Changes
515
* 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
1525
* Fix: compilation for specific windows compilers concerning atomic variables
1626
* Fix: handle correctly array replies with negative size by returning a null reply instead of throwing an invalid format exception
1727
* Fix: Bump tacopie version to retrieve a fix concerning gethostbyname() thread-safety issue on unix
18-
* Fix: compilation for programs based on Qt ('slots' conflict)
28+
* Fix: compilation for programs based on Qt ('slots' conflict)
1929

2030
### Additions
2131
* Add some overloads for the Z set functions to support floating point values

includes/cpp_redis/future_client.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ class future_client {
669669
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.set_advanced(key, value, ex, ex_sec, px, px_milli, nx, xx, cb); });
670670
}
671671
future
672-
setbit(const std::string& key, int offset, const std::string& value) {
673-
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.setbit(key, offset, value, cb); });
672+
setbit_(const std::string& key, int offset, const std::string& value) {
673+
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.setbit_(key, offset, value, cb); });
674674
}
675675
future
676676
setex(const std::string& key, int seconds, const std::string& value) {

includes/cpp_redis/redis_client.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class redis_client {
226226
redis_client& select(int index, const reply_callback_t& reply_callback = nullptr);
227227
redis_client& set(const std::string& key, const std::string& value, const reply_callback_t& reply_callback = nullptr);
228228
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);
229-
redis_client& setbit(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback = nullptr);
229+
redis_client& setbit_(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback = nullptr);
230230
redis_client& setex(const std::string& key, int seconds, const std::string& value, const reply_callback_t& reply_callback = nullptr);
231231
redis_client& setnx(const std::string& key, const std::string& value, const reply_callback_t& reply_callback = nullptr);
232232
redis_client& setrange(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback = nullptr);

includes/cpp_redis/sync_client.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,8 @@ class sync_client {
646646
return m_client.set_advanced(key, value, ex, ex_sec, px, px_milli, nx, xx).get();
647647
}
648648
reply
649-
setbit(const std::string& key, int offset, const std::string& value) {
650-
return m_client.setbit(key, offset, value).get();
649+
setbit_(const std::string& key, int offset, const std::string& value) {
650+
return m_client.setbit_(key, offset, value).get();
651651
}
652652
reply
653653
setex(const std::string& key, int seconds, const std::string& value) {

sources/redis_client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ redis_client::set_advanced(const std::string& key, const std::string& value, boo
11471147
}
11481148

11491149
redis_client&
1150-
redis_client::setbit(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback) {
1150+
redis_client::setbit_(const std::string& key, int offset, const std::string& value, const reply_callback_t& reply_callback) {
11511151
send({"SETBIT", key, std::to_string(offset), value}, reply_callback);
11521152
return *this;
11531153
}

0 commit comments

Comments
 (0)