From 9a481bf40a61aad88e91ac5794beb873b2f42a4d Mon Sep 17 00:00:00 2001 From: Matthew Fioravante Date: Tue, 26 Oct 2021 22:13:41 -0400 Subject: [PATCH] make compact_revision 64 bit --- etcd/Response.hpp | 4 ++-- etcd/v3/V3Response.hpp | 4 ++-- src/Response.cpp | 2 +- src/v3/V3Response.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etcd/Response.hpp b/etcd/Response.hpp index 9627bd0..656851b 100644 --- a/etcd/Response.hpp +++ b/etcd/Response.hpp @@ -134,7 +134,7 @@ namespace etcd * Returns the compact_revision if the response is a watch-cancelled revision. * `-1` means uninitialized (the response is not watch-cancelled) */ - int compact_revision() const; + int64_t compact_revision() const; /** * Returns the lock key. @@ -168,7 +168,7 @@ namespace etcd Value _prev_value; Values _values; Keys _keys; - int _compact_revision = -1; // for watch + int64_t _compact_revision = -1; // for watch std::string _lock_key; // for lock std::string _name; // for campaign (in v3election) std::vector _events; // for watch diff --git a/etcd/v3/V3Response.hpp b/etcd/v3/V3Response.hpp index 5a2bf45..58d65fa 100644 --- a/etcd/v3/V3Response.hpp +++ b/etcd/v3/V3Response.hpp @@ -25,7 +25,7 @@ namespace etcdv3 etcdv3::KeyValue const & get_value() const; etcdv3::KeyValue const & get_prev_value() const; bool has_values() const; - int get_compact_revision() const; + int64_t get_compact_revision() const; void set_lock_key(std::string const &key); std::string const &get_lock_key() const; void set_name(std::string const &name); @@ -40,7 +40,7 @@ namespace etcdv3 etcdv3::KeyValue prev_value; std::vector values; std::vector prev_values; - int compact_revision = -1; + int64_t compact_revision = -1; std::string lock_key; // for lock std::string name; // for campaign (in v3election) std::vector events; // for watch diff --git a/src/Response.cpp b/src/Response.cpp index 353b31e..376d563 100644 --- a/src/Response.cpp +++ b/src/Response.cpp @@ -110,7 +110,7 @@ std::string const & etcd::Response::key(int index) const return _keys[index]; } -int etcd::Response::compact_revision() const +int64_t etcd::Response::compact_revision() const { return _compact_revision; } diff --git a/src/v3/V3Response.cpp b/src/v3/V3Response.cpp index 49378ab..1d9312b 100644 --- a/src/v3/V3Response.cpp +++ b/src/v3/V3Response.cpp @@ -61,7 +61,7 @@ bool etcdv3::V3Response::has_values() const return values.size() > 0; } -int etcdv3::V3Response::get_compact_revision() const +int64_t etcdv3::V3Response::get_compact_revision() const { return compact_revision; }