mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 14:21:10 +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:
parent
73be1d9e8e
commit
15635be59e
3 changed files with 15 additions and 2 deletions
|
@ -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>
|
2003-04-05 Marius Vollmer <mvo@zagadka.de>
|
||||||
|
|
||||||
* Changed license terms to the plain LGPL thru-out.
|
* Changed license terms to the plain LGPL thru-out.
|
||||||
|
@ -317,6 +324,7 @@
|
||||||
(scmconfig.h): build scmconfig.h from gen-scmconfig's output.
|
(scmconfig.h): build scmconfig.h from gen-scmconfig's output.
|
||||||
(BUILT_SOURCES): add scmconfig.h.
|
(BUILT_SOURCES): add scmconfig.h.
|
||||||
|
|
||||||
|
>>>>>>> 1.1798
|
||||||
2003-03-19 Marius Vollmer <mvo@zagadka.de>
|
2003-03-19 Marius Vollmer <mvo@zagadka.de>
|
||||||
|
|
||||||
* gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
|
* gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
|
||||||
|
|
|
@ -269,6 +269,9 @@ rehash_after_gc (void *dummy1 SCM_UNUSED,
|
||||||
if (!SCM_NULLP (to_rehash))
|
if (!SCM_NULLP (to_rehash))
|
||||||
{
|
{
|
||||||
SCM h = to_rehash, last;
|
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
|
do
|
||||||
{
|
{
|
||||||
scm_i_rehash (h,
|
scm_i_rehash (h,
|
||||||
|
@ -282,7 +285,6 @@ rehash_after_gc (void *dummy1 SCM_UNUSED,
|
||||||
/* move tables back to weak_hashtables */
|
/* move tables back to weak_hashtables */
|
||||||
SCM_SET_HASHTABLE_NEXT (last, weak_hashtables);
|
SCM_SET_HASHTABLE_NEXT (last, weak_hashtables);
|
||||||
weak_hashtables = to_rehash;
|
weak_hashtables = to_rehash;
|
||||||
to_rehash = SCM_EOL;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* 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 handle = SCM_BOOL_F; /* Will GC protect the handle whilst unlinked */
|
||||||
SCM pstate_scm;
|
SCM pstate_scm;
|
||||||
scm_print_state *pstate;
|
scm_print_state *pstate;
|
||||||
|
int old_writingp;
|
||||||
|
|
||||||
/* If PORT is a print-state/port pair, use that. Else create a new
|
/* If PORT is a print-state/port pair, use that. Else create a new
|
||||||
print-state. */
|
print-state. */
|
||||||
|
@ -682,8 +683,10 @@ scm_prin1 (SCM exp, SCM port, int writingp)
|
||||||
}
|
}
|
||||||
|
|
||||||
pstate = SCM_PRINT_STATE (pstate_scm);
|
pstate = SCM_PRINT_STATE (pstate_scm);
|
||||||
|
old_writingp = pstate->writingp;
|
||||||
pstate->writingp = writingp;
|
pstate->writingp = writingp;
|
||||||
scm_iprin1 (exp, port, pstate);
|
scm_iprin1 (exp, port, pstate);
|
||||||
|
pstate->writingp = old_writingp;
|
||||||
|
|
||||||
/* Return print state to pool if it has been created above and
|
/* Return print state to pool if it has been created above and
|
||||||
hasn't escaped to Scheme. */
|
hasn't escaped to Scheme. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue