Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Fixed vec_insert() and vec_push() for structs
Browse files Browse the repository at this point in the history
  • Loading branch information
rxi committed Aug 8, 2014
1 parent e193590 commit dd55e00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#define vec_push(v, val)\
( vec_expand_(vec_unpack_(v)) ? -1 :\
((v)->data[(v)->length++] = (val)), 0 )
((v)->data[(v)->length++] = (val), 0), 0 )


#define vec_pop(v)\
Expand All @@ -52,7 +52,7 @@

#define vec_insert(v, idx, val)\
( vec_insert_(vec_unpack_(v), idx) ? -1 :\
((v)->data[idx] = (val)), (v)->length++, 0 )
((v)->data[idx] = (val), 0), (v)->length++, 0 )


#define vec_sort(v, fn)\
Expand Down

0 comments on commit dd55e00

Please sign in to comment.