Skip to content

Commit

Permalink
Chỉ số của phần tử gvec
Browse files Browse the repository at this point in the history
  • Loading branch information
bangoc committed Dec 22, 2021
1 parent d4366a4 commit c4b22c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ typedef struct gvec_s {
#define gvec_capacity(v) (arr_capacity((v)->arr))
#define gvec_arr(v) (ARR(v->arr))
#define gvec_elem(v, i) ((gvec_arr(v))[i])
#define gvec_elem_idx(v, elem) ((long)(elem - gvec_arr(v)))

#define gvec_append(v, val) \
do { \
Expand Down

0 comments on commit c4b22c9

Please sign in to comment.