From 37e64d79cc12ceded903a490c0d6edaa60950fc6 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 30 Oct 2016 23:44:36 -0400 Subject: 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. --- src/nvim/api/private/defs.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/nvim/api/private/defs.h') diff --git a/src/nvim/api/private/defs.h b/src/nvim/api/private/defs.h index 1d5ecd3071..223aab09dc 100644 --- a/src/nvim/api/private/defs.h +++ b/src/nvim/api/private/defs.h @@ -91,9 +91,6 @@ typedef enum { struct object { ObjectType type; union { - Buffer buffer; - Window window; - Tabpage tabpage; Boolean boolean; Integer integer; Float floating; -- cgit