ruby-changes:38911
From: nobu <ko1@a...>
Date: Mon, 22 Jun 2015 09:21:57 +0900 (JST)
Subject: [ruby-changes:38911] nobu:r50992 (trunk): win32.c: use numberof
nobu 2015-06-22 09:21:34 +0900 (Mon, 22 Jun 2015) New Revision: 50992 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50992 Log: win32.c: use numberof * win32/win32.c (open_dir_handle): use numberof() macro. Modified files: trunk/win32/win32.c Index: win32/win32.c =================================================================== --- win32/win32.c (revision 50991) +++ win32/win32.c (revision 50992) @@ -1845,7 +1845,7 @@ open_dir_handle(const WCHAR *filename, W https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L1845 // Create the search pattern // len = lstrlenW(filename); - scanname = ALLOCV_N(WCHAR, v, len + sizeof(wildcard) / sizeof(WCHAR)); + scanname = ALLOCV_N(WCHAR, v, len + numberof(wildcard)); lstrcpyW(scanname, filename); p = CharPrevW(scanname, scanname + len); if (*p == L'/' || *p == L'\\' || *p == L':') -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/