ruby-changes:6786
From: nobu <ko1@a...>
Date: Fri, 1 Aug 2008 14:46:17 +0900 (JST)
Subject: [ruby-changes:6786] Ruby:r18301 (ruby_1_8): * win32/win32.c (rb_w32_telldir): just returns loc.
nobu 2008-08-01 14:45:59 +0900 (Fri, 01 Aug 2008) New Revision: 18301 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18301 Log: * win32/win32.c (rb_w32_telldir): just returns loc. * win32/win32.c (rb_w32_rewinddir): needs to intialize loc. [ruby-core:18041] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/win32/win32.c Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 18300) +++ ruby_1_8/ChangeLog (revision 18301) @@ -1,3 +1,10 @@ +Fri Aug 1 14:45:56 2008 Nobuyoshi Nakada <nobu@r...> + + * win32/win32.c (rb_w32_telldir): just returns loc. + + * win32/win32.c (rb_w32_rewinddir): needs to intialize loc. + [ruby-core:18041] + Thu Jul 31 12:23:53 2008 Nobuyoshi Nakada <nobu@r...> * pack.c (pack_unpack): upper half of hexdigits has never been used. Index: ruby_1_8/win32/win32.c =================================================================== --- ruby_1_8/win32/win32.c (revision 18300) +++ ruby_1_8/win32/win32.c (revision 18301) @@ -1635,15 +1635,7 @@ long rb_w32_telldir(DIR *dirp) { - long loc = 0; char *p = dirp->curr; - - rb_w32_rewinddir(dirp); - - while (p != dirp->curr) { - move_to_next_entry(dirp); loc++; - } - - return loc; + return dirp->loc; } // @@ -1668,6 +1660,7 @@ rb_w32_rewinddir(DIR *dirp) { dirp->curr = dirp->start; + dirp->loc = 0; } // -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/