From 39c99ef76ecd613fe0ae552cb37109d7bf14ef68 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 19 Jan 2007 20:45:59 +0000 Subject: [PATCH] make-pipe accepts #f as first argument svn: r5417 --- src/mzscheme/src/portfun.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mzscheme/src/portfun.c b/src/mzscheme/src/portfun.c index 3e48f47c8f..f7a1f35664 100644 --- a/src/mzscheme/src/portfun.c +++ b/src/mzscheme/src/portfun.c @@ -2350,14 +2350,16 @@ static Scheme_Object *sch_pipe(int argc, Scheme_Object **args) if (argc == 1) { Scheme_Object *o = args[0]; - if ((SCHEME_INTP(o) || SCHEME_BIGNUMP(o)) + if (SCHEME_FALSEP(o)) { + bufmax = 0; + } else if ((SCHEME_INTP(o) || SCHEME_BIGNUMP(o)) && SCHEME_TRUEP(scheme_positive_p(1, args))) { if (SCHEME_INTP(o)) bufmax = SCHEME_INT_VAL(o); else bufmax = 0; } else { - scheme_wrong_type("make-pipe", "positive exact integer", 0, argc, args); + scheme_wrong_type("make-pipe", "positive exact integer or #f", 0, argc, args); return NULL; } } else