- triememory_t*remove = rollback->remove;
- while(remove) {
- triememory_t*next = remove->next;
- if(!trie_remove(t, remove->key)) {
- fprintf(stderr, "Internal error: can't delete key %s in trie during rollback\n", remove->key);
+ triememory_t*op = rollback->ops;
+ while(op) {
+ triememory_t*next = op->next;
+ if(op->del) {
+ if(!_trie_remove(t->start, op->key)) {
+ fprintf(stderr, "Internal error: can't delete key %s in trie during rollback\n", op->key);
+ }
+ } else {
+ if(_trie_put(&t->start, op->key, op->data)) {
+ fprintf(stderr, "Internal error: overwrote key %s in trie during rollback\n", op->key);
+ }