diff options
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r-- | src/nvim/macros.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h index 0bec9af733..351fa55929 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -188,4 +188,11 @@ /// @return ((Type *)obj). #define STRUCT_CAST(Type, obj) ((Type *)(obj)) +// Type of uv_buf_t.len on Windows is ULONG, but others is size_t. +#if defined(WIN32) +# define UV_BUF_LEN(x) (ULONG)(x) +#else +# define UV_BUF_LEN(x) (x) +#endif + #endif // NVIM_MACROS_H |