object_to_vim: Fix buffer/window/tabpage conversion on BE systems

Since data.integer is a different (larger) integer type than
data.{buffer,window,tabpage}, we cannot abuse the union by using
data.integer to access the value for all 4 types.  Instead, remove the
{buffer,window,tabpage} members and always use the integer member.

In order to accomodate this, perform distinct validation and coercion
between the Integer type and Buffer/Window/Tabpage types in
object_to_vim, msgpack_rpc helpers, and gendispatch.lua.
This commit is contained in:
James McCoy
2016-10-30 23:44:36 -04:00
parent 87ff2682d7
commit 37e64d79cc
5 changed files with 22 additions and 19 deletions

View File

@@ -91,9 +91,6 @@ typedef enum {
struct object {
ObjectType type;
union {
Buffer buffer;
Window window;
Tabpage tabpage;
Boolean boolean;
Integer integer;
Float floating;