etc.c: fix parameter
* ext/etc/etc.c (etc_uname): call with same first parameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3aacf88500
commit
21190be21c
@ -702,9 +702,10 @@ etc_uname(VALUE obj)
|
||||
rb_w32_conv_from_wchar(v.szCSDVersion, rb_utf8_encoding()));
|
||||
rb_hash_aset(result, ID2SYM(rb_intern("version")), version);
|
||||
|
||||
GetComputerNameExW(ComputerNameDnsFullyQualified, NULL, &len);
|
||||
# define GET_COMPUTER_NAME(ptr, plen) GetComputerNameExW(ComputerNameDnsFullyQualified, ptr, len);
|
||||
GET_COMPUTER_NAME(NULL, &len);
|
||||
buf = ALLOCV_N(WCHAR, vbuf, len);
|
||||
if (GetComputerNameExW(ComputerNameDnsHostname, buf, &len)) {
|
||||
if (GET_COMPUTER_NAME(buf, &len)) {
|
||||
nodename = rb_w32_conv_from_wchar(buf, rb_utf8_encoding());
|
||||
}
|
||||
ALLOCV_END(vbuf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user