change for-each back to always producing void

svn: r4832
This commit is contained in:
Matthew Flatt 2006-11-13 04:20:23 +00:00
parent c19e157b48
commit c5f4d87e2c
5 changed files with 14 additions and 7 deletions

View File

@ -1360,7 +1360,7 @@
(map-tests andmap) (map-tests andmap)
(map-tests ormap) (map-tests ormap)
(test-values '(1 2) (lambda () (for-each (lambda (x) (values 1 2)) '(1 2)))) (test-values (list (void)) (lambda () (for-each (lambda (x) (values 1 2)) '(1 2))))
(err/rt-test (map (lambda (x) (values 1 2)) '(1 2)) arity?) (err/rt-test (map (lambda (x) (values 1 2)) '(1 2)) arity?)
(test #t andmap add1 null) (test #t andmap add1 null)

View File

@ -23,8 +23,8 @@ Filesystem:
link guard procedure link guard procedure
Misc: Misc:
Removed write-image-to-file and read-image-from-file Removed write-image-to-file and read-image-from-file
for-each, ormap, and andmap now tail-apply the given function ormap and andmap now tail-apply a given function for the
for the last call last list element(s)
eval evaluates its argument in tail position eval evaluates its argument in tail position
Improved compilation of call-with-values and an immediate Improved compilation of call-with-values and an immediate
lambda argument to avoid closure creation lambda argument to avoid closure creation

View File

@ -1581,7 +1581,14 @@ void wxImageSnip::Copy(wxImageSnip *newSnip)
newSnip->viewh = viewh; newSnip->viewh = viewh;
newSnip->viewdx = viewdx; newSnip->viewdx = viewdx;
newSnip->viewdy = viewdy; newSnip->viewdy = viewdy;
newSnip->bm = bm; newSnip->bm = bm;
newSnip->mask = mask;
if (bm)
bm->selectedIntoDC++;
if (mask)
mask->selectedIntoDC++;
} }
char *wxImageSnip::GetFilename(Bool *rel) char *wxImageSnip::GetFilename(Bool *rel)

View File

@ -2442,8 +2442,6 @@ int scheme_get_port_socket(Scheme_Object *p, long *_s)
} }
} }
} else if (SCHEME_INPORTP(p)) { } else if (SCHEME_INPORTP(p)) {
/* Abandon is not really useful on input ports from the Schemer's
perspective, but it's here for completeness. */
Scheme_Input_Port *ip; Scheme_Input_Port *ip;
ip = (Scheme_Input_Port *)p; ip = (Scheme_Input_Port *)p;
if (ip->sub_type == scheme_tcp_input_port_type) { if (ip->sub_type == scheme_tcp_input_port_type) {

View File

@ -105,11 +105,13 @@ DO_MAP(int argc, Scheme_Object *argv[])
v = _scheme_apply(argv[0], argc, args); v = _scheme_apply(argv[0], argc, args);
#else #else
# ifdef FOR_EACH_MODE # ifdef FOR_EACH_MODE
# if 0
/* Last in tail position (currently disabled): */
if (pos + 1 == size) { if (pos + 1 == size) {
return _scheme_tail_apply(argv[0], argc, args); return _scheme_tail_apply(argv[0], argc, args);
} else {
_scheme_apply_multi(argv[0], argc, args);
} }
# endif
_scheme_apply_multi(argv[0], argc, args);
# else # else
if (pos + 1 == size) { if (pos + 1 == size) {
return _scheme_tail_apply(argv[0], argc, args); return _scheme_tail_apply(argv[0], argc, args);