mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
(scm_iprin1): Print uninterned symbols unreadably.
This commit is contained in:
parent
ac48757b5e
commit
9ff28a13e0
1 changed files with 17 additions and 4 deletions
|
@ -527,10 +527,23 @@ scm_iprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
|||
scm_lfwrite (SCM_STRING_CHARS (exp), SCM_STRING_LENGTH (exp), port);
|
||||
break;
|
||||
case scm_tc7_symbol:
|
||||
scm_print_symbol_name (SCM_SYMBOL_CHARS (exp),
|
||||
SCM_SYMBOL_LENGTH (exp),
|
||||
port);
|
||||
scm_remember_upto_here_1 (exp);
|
||||
if (SCM_SYMBOL_INTERNED_P (exp))
|
||||
{
|
||||
scm_print_symbol_name (SCM_SYMBOL_CHARS (exp),
|
||||
SCM_SYMBOL_LENGTH (exp),
|
||||
port);
|
||||
scm_remember_upto_here_1 (exp);
|
||||
}
|
||||
else
|
||||
{
|
||||
scm_puts ("#<uninterned-symbol ", port);
|
||||
scm_print_symbol_name (SCM_SYMBOL_CHARS (exp),
|
||||
SCM_SYMBOL_LENGTH (exp),
|
||||
port);
|
||||
scm_putc (' ', port);
|
||||
scm_intprint ((long)exp, 16, port);
|
||||
scm_putc ('>', port);
|
||||
}
|
||||
break;
|
||||
case scm_tc7_variable:
|
||||
scm_i_variable_print (exp, port, pstate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue