aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc/helpers.h
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-01-29 01:29:51 +0300
committerZyX <kp-pav@yandex.ru>2017-03-27 00:12:23 +0300
commit62fde319360e27a86c0deba0053ff230f80ca772 (patch)
treedf2106bd16b956eef4a89d6d66e58b9192176277 /src/nvim/msgpack_rpc/helpers.h
parent140cd0da1d0b10cf19a501696971ca2e20eff75b (diff)
downloadrneovim-62fde319360e27a86c0deba0053ff230f80ca772.tar.gz
rneovim-62fde319360e27a86c0deba0053ff230f80ca772.tar.bz2
rneovim-62fde319360e27a86c0deba0053ff230f80ca772.zip
api: Also shift numbers in api_metadata output
Fixes problem introduced by “api: Allow kObjectTypeNil to be zero without breaking compatibility”: apparently there are clients which use metadata and there are which aren’t. For the first that commit would not be needed, for the second that commit misses this critical piece.
Diffstat (limited to 'src/nvim/msgpack_rpc/helpers.h')
-rw-r--r--src/nvim/msgpack_rpc/helpers.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/msgpack_rpc/helpers.h b/src/nvim/msgpack_rpc/helpers.h
index 7d9f114140..0e4cd1be6d 100644
--- a/src/nvim/msgpack_rpc/helpers.h
+++ b/src/nvim/msgpack_rpc/helpers.h
@@ -9,6 +9,13 @@
#include "nvim/event/wstream.h"
#include "nvim/api/private/defs.h"
+/// Value by which objects represented as EXT type are shifted
+///
+/// Subtracted when packing, added when unpacking. Used to allow moving
+/// buffer/window/tabpage block inside ObjectType enum. This block yet cannot be
+/// split or reordered.
+#define EXT_OBJECT_TYPE_SHIFT kObjectTypeBuffer
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "msgpack_rpc/helpers.h.generated.h"
#endif