diff options
Diffstat (limited to 'src/nvim/api/private/defs.h')
-rw-r--r-- | src/nvim/api/private/defs.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/nvim/api/private/defs.h b/src/nvim/api/private/defs.h index fbfa87d5ae..223aab09dc 100644 --- a/src/nvim/api/private/defs.h +++ b/src/nvim/api/private/defs.h @@ -9,13 +9,15 @@ #define STRING_INIT {.data = NULL, .size = 0} #define OBJECT_INIT { .type = kObjectTypeNil } #define ERROR_INIT { .set = false } -#define REMOTE_TYPE(type) typedef uint64_t type +#define REMOTE_TYPE(type) typedef handle_T type #ifdef INCLUDE_GENERATED_DECLARATIONS - #define ArrayOf(...) Array - #define DictionaryOf(...) Dictionary +# define ArrayOf(...) Array +# define DictionaryOf(...) Dictionary #endif +typedef int handle_T; + // Basic types typedef enum { kErrorTypeException, @@ -31,6 +33,9 @@ typedef enum { /// Used as the message ID of notifications. #define NO_RESPONSE UINT64_MAX +/// Used as channel_id when the call is local. +#define INTERNAL_CALL UINT64_MAX + typedef struct { ErrorType type; char msg[1024]; @@ -41,6 +46,12 @@ typedef bool Boolean; typedef int64_t Integer; typedef double Float; +/// Maximum value of an Integer +#define API_INTEGER_MAX INT64_MAX + +/// Minimum value of an Integer +#define API_INTEGER_MIN INT64_MIN + typedef struct { char *data; size_t size; @@ -80,9 +91,6 @@ typedef enum { struct object { ObjectType type; union { - Buffer buffer; - Window window; - Tabpage tabpage; Boolean boolean; Integer integer; Float floating; |