diff options
Diffstat (limited to '')
-rw-r--r-- | buffer.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -315,6 +315,26 @@ x_gc_free (struct gc_arena *a) } /* + * Transfer src arena to dest, resetting src to an empty arena. + */ +void +gc_transfer (struct gc_arena *dest, struct gc_arena *src) +{ + if (dest && src) + { + struct gc_entry *e = src->list; + if (e) + { + while (e->next != NULL) + e = e->next; + e->next = dest->list; + dest->list = src->list; + src->list = NULL; + } + } +} + +/* * Hex dump -- Output a binary buffer to a hex string and return it. */ |