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

* backtrace.c: Added #include "fluids.h"

(scm_init_backtrace): Initialize `the-last-stack' to a fluid.
(scm_backtrace): `the-last-stack' is now a fluid.

* init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
after scm_init_fluids.
This commit is contained in:
Mikael Djurfeldt 1997-11-29 01:10:21 +00:00
parent e085f7a634
commit a5d6d578d6
4 changed files with 18 additions and 4 deletions

View file

@ -51,6 +51,7 @@
#include "struct.h"
#include "strports.h"
#include "throw.h"
#include "fluids.h"
#include "backtrace.h"
@ -538,10 +539,11 @@ SCM_PROC(s_backtrace, "backtrace", 0, 0, 0, scm_backtrace);
SCM
scm_backtrace ()
{
if (SCM_NFALSEP (SCM_CDR (scm_the_last_stack_var)))
SCM the_last_stack = scm_fluid_ref (SCM_CDR (scm_the_last_stack_var));
if (SCM_NFALSEP (the_last_stack))
{
scm_newline (scm_cur_outp);
scm_display_backtrace (SCM_CDR (scm_the_last_stack_var),
scm_display_backtrace (the_last_stack,
scm_cur_outp,
SCM_UNDEFINED,
SCM_UNDEFINED);
@ -568,7 +570,8 @@ scm_backtrace ()
void
scm_init_backtrace ()
{
scm_the_last_stack_var = scm_sysintern ("the-last-stack", SCM_BOOL_F);
SCM f = scm_make_fluid ();
scm_the_last_stack_var = scm_sysintern ("the-last-stack", f);
#include "backtrace.x"
}