From 2932359000b2f918d5fade79ea4d124d5943cd07 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 24 Jul 2016 22:04:11 +0200 Subject: patch 7.4.2101 Problem: Looping over windows, buffers and tab pages is inconsistant. Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan) --- src/if_perl.xs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/if_perl.xs') diff --git a/src/if_perl.xs b/src/if_perl.xs index a2ff45208a..5b5023c07e 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -1534,14 +1534,14 @@ Buffers(...) if (GIMME == G_SCALAR) { i = 0; - for (vimbuf = firstbuf; vimbuf; vimbuf = vimbuf->b_next) + FOR_ALL_BUFFERS(vimbuf) ++i; XPUSHs(sv_2mortal(newSViv(i))); } else { - for (vimbuf = firstbuf; vimbuf; vimbuf = vimbuf->b_next) + FOR_ALL_BUFFERS(vimbuf) XPUSHs(newBUFrv(newSV(0), vimbuf)); } } @@ -1586,7 +1586,7 @@ Windows(...) XPUSHs(sv_2mortal(newSViv(win_count()))); else { - for (vimwin = firstwin; vimwin != NULL; vimwin = W_NEXT(vimwin)) + FOR_ALL_WINDOWS(vimwin) XPUSHs(newWINrv(newSV(0), vimwin)); } } -- cgit v1.2.3