mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
kvec: Add kv_Z which is like kv_A, but zero is the last value
This commit is contained in:
@@ -62,7 +62,8 @@
|
||||
#define kv_pop(v) ((v).items[--(v).size])
|
||||
#define kv_size(v) ((v).size)
|
||||
#define kv_max(v) ((v).capacity)
|
||||
#define kv_last(v) kv_A(v, kv_size(v) - 1)
|
||||
#define kv_Z(v, i) kv_A(v, kv_size(v) - (i) - 1)
|
||||
#define kv_last(v) kv_Z(v, 0)
|
||||
|
||||
/// Drop last n items from kvec without resizing
|
||||
///
|
||||
|
Reference in New Issue
Block a user