void* List_Iterate(List_Iterator* iterator) { word data; void* address; assert(iterator != NULL); address = NULL; if (iterator->Position < iterator->ParentList->Count) { data = *(word*)Array_Read(&iterator->ParentList->DataStore, iterator->Position * sizeof(void*), sizeof(void*)); address = (void*)data; iterator->Position++; } return address; }
void* Stack_Pop(Stack* self) { assert(self->Pointer >= sizeof(void*)); self->Pointer -= sizeof(void*); return (void*)Array_Read(&self->Data, self->Pointer, sizeof(void*)); }