GNU bug report logs -
#44155
Print integers as characters
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 22 Oct 2020 21:12:01 UTC
Severity: normal
Tags: fixed, patch
Done: Mattias EngdegÄrd <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Okt 22 2020, Juri Linkov wrote:
> diff --git a/src/print.c b/src/print.c
> index dca095f281..909c55efed 100644
> --- a/src/print.c
> +++ b/src/print.c
> @@ -1908,8 +1908,16 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
> {
> case_Lisp_Int:
> {
> - int len = sprintf (buf, "%"pI"d", XFIXNUM (obj));
> - strout (buf, len, len, printcharfun);
> + if (print_integers_as_characters && CHARACTERP (obj))
> + {
> + printchar ('?', printcharfun);
> + print_string (CALLN (Fstring, obj), printcharfun);
That will create ambigous output.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
This bug report was last modified 4 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.