mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* hash.c: refactoring prior patch (getenvsize win32 specfic function).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5281610f91
commit
bdc8f4fca9
1 changed files with 3 additions and 7 deletions
10
hash.c
10
hash.c
|
@ -2198,13 +2198,9 @@ envix(const char *nam)
|
||||||
static int
|
static int
|
||||||
getenvsize(char* p)
|
getenvsize(char* p)
|
||||||
{
|
{
|
||||||
char prev = *p++;
|
char* porg = p;
|
||||||
int len = 1;
|
while (*p || *(p + 1)) ++p;
|
||||||
for (; prev || *p; p++) {
|
return p - porg + 1;
|
||||||
prev = *p;
|
|
||||||
len++;
|
|
||||||
}
|
|
||||||
return len;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue