fix `print-syntax-width' for +inf.0

Closes PR 12837
This commit is contained in:
Matthew Flatt 2012-06-10 06:57:28 +08:00
parent 6b2419f100
commit 5caa114564
2 changed files with 6 additions and 3 deletions

View File

@ -243,7 +243,10 @@
(test #f regexp-match? (regexp-quote (path->bytes super)) (get-output-string o)))) (test #f regexp-match? (regexp-quote (path->bytes super)) (get-output-string o))))
(loop super))))) (loop super)))))
;; ----------------------------------------
;; make sure +inf.0 is ok for `print-syntax-width':
(parameterize ([print-syntax-width +inf.0])
(test +inf.0 print-syntax-width))
;; ---------------------------------------- ;; ----------------------------------------

View File

@ -742,8 +742,8 @@ static Scheme_Object *good_syntax_width(int c, Scheme_Object **argv)
|| !SCHEME_INT_VAL(argv[0])) || !SCHEME_INT_VAL(argv[0]))
: (SCHEME_BIGNUMP(argv[0]) : (SCHEME_BIGNUMP(argv[0])
? SCHEME_BIGPOS(argv[0]) ? SCHEME_BIGPOS(argv[0])
: (SCHEME_FLTP(argv[0]) : (SCHEME_DBLP(argv[0])
? MZ_IS_POS_INFINITY(SCHEME_FLT_VAL(argv[0])) ? MZ_IS_POS_INFINITY(SCHEME_DBL_VAL(argv[0]))
: 0))); : 0)));
return ok ? scheme_true : scheme_false; return ok ? scheme_true : scheme_false;