Home | History | Annotate | Download | only in sail

Lines Matching defs:index_

55 void *array_get(const struct array *, unsigned index_);
56 void array_set(const struct array *, unsigned index_, void *val);
59 int array_insert(struct array *a, unsigned index_);
60 void array_remove(struct array *a, unsigned index_);
76 array_get(const struct array *a, unsigned index_)
78 arrayassert(index_ < a->num);
79 return a->v[index_];
83 array_set(const struct array *a, unsigned index_, void *val)
85 arrayassert(index_ < a->num);
86 a->v[index_] = val;
92 unsigned index_ = a->num;
93 if (array_setsize(a, index_+1)) {
96 a->v[index_] = val;
98 *index_ret = index_;
147 T *ARRAY##_get(const struct ARRAY *a, unsigned index_); \
148 void ARRAY##_set(struct ARRAY *a, unsigned index_, T *val); \
151 int ARRAY##_insert(struct ARRAY *a, unsigned index_); \
152 void ARRAY##_remove(struct ARRAY *a, unsigned index_)
195 ARRAY##_get(const struct ARRAY *a, unsigned index_) \
197 return (T *)array_get(&a->arr, index_); \
201 ARRAY##_set(struct ARRAY *a, unsigned index_, T *val) \
203 array_set(&a->arr, index_, (void *)val); \
219 ARRAY##_insert(struct ARRAY *a, unsigned index_) \
221 return array_insert(&a->arr, index_); \
225 ARRAY##_remove(struct ARRAY *a, unsigned index_) \
227 return array_remove(&a->arr, index_); \