Use std/std_vector.i instead of a poor copy in c/std_vector.i
At the very least, this gives us a working vector<bool> and allows "li_std_vector" unit test to pass. It is also just nice to reuse the existing typemaps instead of having another copy of them. As C doesn't have UTL, some parts of std_vector.i had to be excluded from it however.
This commit is contained in:
parent
29563ec98e
commit
d89a95a48c
7 changed files with 27 additions and 60 deletions
|
|
@ -17,7 +17,7 @@ int main() {
|
|||
printf("size=%d\ncapacity=%d\n\n", Vint_size(vint), Vint_capacity(vint));
|
||||
|
||||
for (i = 0; i < Vint_size(vint); i++)
|
||||
printf("%d%c", Vint_at(vint, i), i+1 == Vint_size(vint) ? '\n' : ',');
|
||||
printf("%d%c", Vint_get(vint, i), i+1 == Vint_size(vint) ? '\n' : ',');
|
||||
|
||||
Vint_clear(vint);
|
||||
Vint_reserve(vint, 100);
|
||||
|
|
@ -32,7 +32,7 @@ int main() {
|
|||
}
|
||||
|
||||
for (i = 0; i < VA_size(va); i++) {
|
||||
A *a = VA_at(va, i);
|
||||
A *a = VA_get(va, i);
|
||||
printf("%s %d\n", A_name_get(a), A_value_get(a));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue