out-of-line generic functions. The vectors are designed to
interoperate with the GTY machinery.
- Because of the different behaviour of objects and of pointers to
+ Because of the different behavior of objects and of pointers to
objects, there are two flavors. One to deal with a vector of
pointers to objects, and one to deal with a vector of objects
themselves. Both of these pass pointers to objects around -- in
Ensure that V has at least RESERVE slots available, if RESERVE is
>= 0. If RESERVE < 0, ensure that there is at least one spare
- slot. These differ in their reallocation behaviour, the first will
+ slot. These differ in their reallocation behavior, the first will
not create additional headroom, but the second mechanism will
perform the usual exponential headroom increase. Note this can
cause V to be reallocated. Returns nonzero iff reallocation
Find the first position in which VAL could be inserted without
changing the ordering of V. LESSTHAN is a function that returns
- true if the first argument is strictly less than the second. */
+ true if the first argument is strictly less than the second. */
#define VEC_lower_bound(TDEF,V,O,LT) \
(VEC_OP(TDEF,lower_bound)(V,O,LT VEC_CHECK_INFO))
(VEC (TDEF) *vec_, int alloc_) \
{ \
return vec_ ? ((vec_)->alloc - (vec_)->num \
- < (unsigned)(alloc_ < 0 ? 1 : alloc_)) : alloc_ != 0; \
+ >= (unsigned)(alloc_ < 0 ? 1 : alloc_)) : !alloc_; \
} \
\
static inline int VEC_OP (TDEF,reserve) \
(VEC (TDEF) **vec_, int alloc_ MEM_STAT_DECL) \
{ \
- int extend = VEC_OP (TDEF,space) (*vec_, alloc_); \
+ int extend = !VEC_OP (TDEF,space) (*vec_, alloc_); \
\
if (extend) \
*vec_ = (VEC (TDEF) *) vec_##a##_p_reserve (*vec_, alloc_ PASS_MEM_STAT); \
(VEC (TDEF) *vec_, int alloc_) \
{ \
return vec_ ? ((vec_)->alloc - (vec_)->num \
- < (unsigned)(alloc_ < 0 ? 1 : alloc_)) : alloc_ != 0; \
+ >= (unsigned)(alloc_ < 0 ? 1 : alloc_)) : !alloc_; \
} \
\
static inline int VEC_OP (TDEF,reserve) \
(VEC (TDEF) **vec_, int alloc_ MEM_STAT_DECL) \
{ \
- int extend = VEC_OP (TDEF,space) (*vec_, alloc_); \
+ int extend = !VEC_OP (TDEF,space) (*vec_, alloc_); \
\
if (extend) \
*vec_ = (VEC (TDEF) *) vec_##a##_o_reserve (*vec_, alloc_, \