diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1998-11-09 15:52:29 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1998-11-09 15:52:29 +0000 |
commit | 56977059e444b06a1606e6d871d643535045205f (patch) | |
tree | a5523d87dc94de84b0c7b4d34444b666a49fa3c8 | |
parent | 6162a00d07501339520ad3282b1b9d48e20db9a1 (diff) | |
download | guile-56977059e444b06a1606e6d871d643535045205f.tar.gz |
* print.c (scm_iprin1): Print gsubrs as primitives.
-rw-r--r-- | libguile/ChangeLog | 4 | ||||
-rw-r--r-- | libguile/print.c | 23 |
2 files changed, 24 insertions, 3 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 849161902..a67d0c6db 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,7 @@ +1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se> + + * print.c (scm_iprin1): Print gsubrs as primitives. + 1998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type. diff --git a/libguile/print.c b/libguile/print.c index b259fbe3a..0a3f808fa 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -604,9 +604,26 @@ taloop: break; #ifdef CCLO case scm_tc7_cclo: - scm_puts ("#<compiled-closure ", port); - scm_iprin1 (SCM_CCLO_SUBR (exp), port, pstate); - scm_putc ('>', port); + { + SCM proc = SCM_CCLO_SUBR (exp); + if (proc == scm_f_gsubr_apply) + { + /* Print gsubrs as primitives */ + SCM name = scm_procedure_property (exp, scm_i_name); + scm_puts ("#<primitive-procedure", port); + if (SCM_NFALSEP (name)) + { + scm_putc (' ', port); + scm_puts (SCM_CHARS (name), port); + } + } + else + { + scm_puts ("#<compiled-closure ", port); + scm_iprin1 (proc, port, pstate); + } + scm_putc ('>', port); + } break; #endif case scm_tc7_contin: |