Consider multiple error repairs on the same path of the stack
This changes the API to the stack_iterate function so that you can pop from the stack without stopping iteration
This commit is contained in:
parent
3778c63277
commit
cad663b144
8 changed files with 203 additions and 216 deletions
|
|
@ -55,11 +55,13 @@ extern "C" {
|
|||
#define array_reverse(self) \
|
||||
array__reverse((VoidArray *)(self), array__elem_size(self))
|
||||
|
||||
#define array_copy(self) \
|
||||
{ \
|
||||
memcpy(ts_calloc((self)->capacity, array__elem_size(self)), \
|
||||
(self)->contents, (self)->size *array__elem_size(self)), \
|
||||
(self)->size, (self)->capacity, \
|
||||
#define array_copy(self) \
|
||||
{ \
|
||||
(self)->contents \
|
||||
? memcpy(ts_calloc((self)->capacity, array__elem_size(self)), \
|
||||
(self)->contents, (self)->size *array__elem_size(self)) \
|
||||
: NULL, \
|
||||
(self)->size, (self)->capacity, \
|
||||
}
|
||||
|
||||
// Private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue