remove vec_extend_ip. close #9
This commit is contained in:
parent
90d6a3572c
commit
e6a2af0bf6
|
@ -20,7 +20,6 @@ struct pic_vector {
|
||||||
|
|
||||||
struct pic_vector *pic_vec_new(pic_state *, size_t);
|
struct pic_vector *pic_vec_new(pic_state *, size_t);
|
||||||
struct pic_vector *pic_vec_new_from_list(pic_state *, pic_value);
|
struct pic_vector *pic_vec_new_from_list(pic_state *, pic_value);
|
||||||
void pic_vec_extend_ip(pic_state *, struct pic_vector *, size_t);
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
13
vector.c
13
vector.c
|
@ -37,19 +37,6 @@ pic_vec_new_from_list(pic_state *pic, pic_value data)
|
||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
pic_vec_extend_ip(pic_state *pic, struct pic_vector *vec, size_t size)
|
|
||||||
{
|
|
||||||
size_t len, i;
|
|
||||||
|
|
||||||
len = vec->len;
|
|
||||||
vec->len = size;
|
|
||||||
vec->data = (pic_value *)pic_realloc(pic, vec->data, sizeof(pic_value) * size);
|
|
||||||
for (i = len; i < size; ++i) {
|
|
||||||
vec->data[i] = pic_none_value();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static pic_value
|
static pic_value
|
||||||
pic_vec_vector_p(pic_state *pic)
|
pic_vec_vector_p(pic_state *pic)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue