diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-03-06 16:03:04 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-03-07 08:02:38 -0300 |
commit | 3005681a02ca0478231329b5deae83a308687b21 (patch) | |
tree | a7313818d8c1851b0092574f1fbfc98289f7fc25 /src/garray.h | |
parent | cab5c25c70b884fe5428c4bfbd043316ff642518 (diff) | |
download | rneovim-3005681a02ca0478231329b5deae83a308687b21.tar.gz rneovim-3005681a02ca0478231329b5deae83a308687b21.tar.bz2 rneovim-3005681a02ca0478231329b5deae83a308687b21.zip |
Move garray_T from structs.h to garray.h
Diffstat (limited to 'src/garray.h')
-rw-r--r-- | src/garray.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/garray.h b/src/garray.h index ff57ec957d..412a7f3ec3 100644 --- a/src/garray.h +++ b/src/garray.h @@ -1,6 +1,21 @@ #ifndef NEOVIM_GARRAY_H #define NEOVIM_GARRAY_H +/* + * Structure used for growing arrays. + * This is used to store information that only grows, is deleted all at + * once, and needs to be accessed by index. See ga_clear() and ga_grow(). + */ +typedef struct growarray { + int ga_len; /* current number of items used */ + int ga_maxlen; /* maximum number of items possible */ + int ga_itemsize; /* sizeof(item) */ + int ga_growsize; /* number of items to grow each time */ + void *ga_data; /* pointer to the first item */ +} garray_T; + +#define GA_EMPTY {0, 0, 0, 0, NULL} + void ga_clear(garray_T *gap); void ga_clear_strings(garray_T *gap); void ga_init(garray_T *gap); |