1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* hashtab.c (rehash_after_gc): Clear to_rehash list before

processing it in order to avoid an infinite loop.

* print.c (scm_prin1): Remember old state of pstate->writingp.
This commit is contained in:
Mikael Djurfeldt 2003-04-05 20:45:17 +00:00
parent 73be1d9e8e
commit 15635be59e
3 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* hashtab.c (rehash_after_gc): Clear to_rehash list before
processing it in order to avoid an infinite loop.
* print.c (scm_prin1): Remember old state of pstate->writingp.
2003-04-05 Marius Vollmer <mvo@zagadka.de>
* Changed license terms to the plain LGPL thru-out.
@ -317,6 +324,7 @@
(scmconfig.h): build scmconfig.h from gen-scmconfig's output.
(BUILT_SOURCES): add scmconfig.h.
>>>>>>> 1.1798
2003-03-19 Marius Vollmer <mvo@zagadka.de>
* gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from

View file

@ -269,6 +269,9 @@ rehash_after_gc (void *dummy1 SCM_UNUSED,
if (!SCM_NULLP (to_rehash))
{
SCM h = to_rehash, last;
/* important to clear to_rehash here so that we don't get stuck
in an infinite loop if scm_i_rehash causes GC */
to_rehash = SCM_EOL;
do
{
scm_i_rehash (h,
@ -282,7 +285,6 @@ rehash_after_gc (void *dummy1 SCM_UNUSED,
/* move tables back to weak_hashtables */
SCM_SET_HASHTABLE_NEXT (last, weak_hashtables);
weak_hashtables = to_rehash;
to_rehash = SCM_EOL;
}
return 0;
}

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995-1999,2000,2001, 2002 Free Software Foundation, Inc.
/* Copyright (C) 1995-1999,2000,2001, 2002, 2003 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -657,6 +657,7 @@ scm_prin1 (SCM exp, SCM port, int writingp)
SCM handle = SCM_BOOL_F; /* Will GC protect the handle whilst unlinked */
SCM pstate_scm;
scm_print_state *pstate;
int old_writingp;
/* If PORT is a print-state/port pair, use that. Else create a new
print-state. */
@ -682,8 +683,10 @@ scm_prin1 (SCM exp, SCM port, int writingp)
}
pstate = SCM_PRINT_STATE (pstate_scm);
old_writingp = pstate->writingp;
pstate->writingp = writingp;
scm_iprin1 (exp, port, pstate);
pstate->writingp = old_writingp;
/* Return print state to pool if it has been created above and
hasn't escaped to Scheme. */