api: unify buffer numbers and window ids with handles

also allow handle==0 meaning curbuf/curwin/curtab
This commit is contained in:
Björn Linse
2016-06-19 21:06:03 +02:00
parent 3bd3b3b768
commit a2d25b7bf8
15 changed files with 98 additions and 84 deletions

View File

@@ -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
#endif
typedef int handle_T;
// Basic types
typedef enum {
kErrorTypeException,