mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
gpgscm: Recover cells from the list of recently allocated cells.
* tests/gpgscm/scheme.c (ok_to_freely_gc): Recover cells. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
e0cbd3389e
commit
ee08677d63
@ -805,6 +805,17 @@ static void push_recent_alloc(scheme *sc, pointer recent, pointer extra)
|
||||
car(sc->sink) = holder;
|
||||
}
|
||||
|
||||
static INLINE void ok_to_freely_gc(scheme *sc)
|
||||
{
|
||||
pointer a = car(sc->sink), next;
|
||||
car(sc->sink) = sc->NIL;
|
||||
while (a != sc->NIL)
|
||||
{
|
||||
next = cdr(a);
|
||||
free_cell(sc, a);
|
||||
a = next;
|
||||
}
|
||||
}
|
||||
|
||||
static pointer get_cell(scheme *sc, pointer a, pointer b)
|
||||
{
|
||||
@ -832,12 +843,6 @@ static pointer get_vector_object(scheme *sc, int len, pointer init)
|
||||
return cells;
|
||||
}
|
||||
|
||||
static INLINE void ok_to_freely_gc(scheme *sc)
|
||||
{
|
||||
car(sc->sink) = sc->NIL;
|
||||
}
|
||||
|
||||
|
||||
#if defined TSGRIND
|
||||
static void check_cell_alloced(pointer p, int expect_alloced)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user