mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 14:26:07 +00:00
api metadata: Allow typed container information in api functions
Adapt gendeclarations.lua/msgpack-gen.lua to allow the `ArrayOf(...)` and `DictionaryOf(...)` types in function headers. These are simple macros that expand to Array and Dictionary respectively, but the information is kept in the metadata object, which is useful for building clients in statically typed languages.
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
#define OBJECT_INIT { .type = kObjectTypeNil }
|
||||
#define REMOTE_TYPE(type) typedef uint64_t type
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
#define ArrayOf(...) Array
|
||||
#define DictionaryOf(...) Dictionary
|
||||
#endif
|
||||
|
||||
// Basic types
|
||||
typedef struct {
|
||||
char msg[256];
|
||||
|
Reference in New Issue
Block a user