diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2003-04-05 20:45:17 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2003-04-05 20:45:17 +0000 |
commit | 15635be59e37b7a26bdfa1a2376c27952a4833da (patch) | |
tree | fc4c39a305b930ca879742b8f20384784de9700c /libguile/print.c | |
parent | 73be1d9e8ef3744723949752311e60d6a0f89342 (diff) | |
download | guile-15635be59e37b7a26bdfa1a2376c27952a4833da.tar.gz |
* 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.
Diffstat (limited to 'libguile/print.c')
-rw-r--r-- | libguile/print.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libguile/print.c b/libguile/print.c index 997fecaf9..f0b8ec1d0 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -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. */ |