Fix warning when assing size_t type value to uv_buf_t.len, convert type to ULONG on Windows.

This commit is contained in:
George Zhao
2018-01-17 19:40:31 +08:00
parent bac86a1941
commit 12acf0f7a7
5 changed files with 21 additions and 7 deletions

View File

@@ -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