diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-12-04 10:59:58 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-12-04 13:29:44 +0100 |
commit | 17a58043a3fc49179a47590e905ed3a7d5a29907 (patch) | |
tree | 325fdc3f20f6c3b5c5d4a5087c9a0f8adee2dc3a /src/nvim/api/private/helpers.h | |
parent | ced951c2aacd175c21c68a5bbf7fdf459954d0ab (diff) | |
download | rneovim-17a58043a3fc49179a47590e905ed3a7d5a29907.tar.gz rneovim-17a58043a3fc49179a47590e905ed3a7d5a29907.tar.bz2 rneovim-17a58043a3fc49179a47590e905ed3a7d5a29907.zip |
api/options: cleanup the fixup
Diffstat (limited to 'src/nvim/api/private/helpers.h')
-rw-r--r-- | src/nvim/api/private/helpers.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h index 271fd5b485..055abb797f 100644 --- a/src/nvim/api/private/helpers.h +++ b/src/nvim/api/private/helpers.h @@ -16,6 +16,7 @@ #define BOOLEAN_OBJ(b) ((Object) { \ .type = kObjectTypeBoolean, \ .data.boolean = b }) +#define BOOL(b) BOOLEAN_OBJ(b) #define INTEGER_OBJ(i) ((Object) { \ .type = kObjectTypeInteger, \ @@ -29,6 +30,8 @@ .type = kObjectTypeString, \ .data.string = s }) +#define CSTR_TO_OBJ(s) STRING_OBJ(cstr_to_string(s)) + #define BUFFER_OBJ(s) ((Object) { \ .type = kObjectTypeBuffer, \ .data.integer = s }) @@ -59,6 +62,8 @@ #define PUT(dict, k, v) \ kv_push(dict, ((KeyValuePair) { .key = cstr_to_string(k), .value = v })) +#define PUT_BOOL(dict, name, condition) PUT(dict, name, BOOLEAN_OBJ(condition)); + #define ADD(array, item) \ kv_push(array, item) |