make-pipe accepts #f as first argument
svn: r5417
This commit is contained in:
parent
4110c9ad99
commit
39c99ef76e
|
@ -2350,14 +2350,16 @@ static Scheme_Object *sch_pipe(int argc, Scheme_Object **args)
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
Scheme_Object *o = args[0];
|
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))) {
|
&& SCHEME_TRUEP(scheme_positive_p(1, args))) {
|
||||||
if (SCHEME_INTP(o))
|
if (SCHEME_INTP(o))
|
||||||
bufmax = SCHEME_INT_VAL(o);
|
bufmax = SCHEME_INT_VAL(o);
|
||||||
else
|
else
|
||||||
bufmax = 0;
|
bufmax = 0;
|
||||||
} else {
|
} 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user