You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking through the Windows-specific code, I see lots of instances of *W (like GetVersionW) methods called explicitly, which forces wide characters. Typically I'd expect use use of undecorated names like GetVersion, which lets the compiler configure for or against wide character support (and is future proof!)
Is there any reason why the code is written this way?
There was a commit from @piscisaureus that describes a change from GetVersionA to GetVersionW -- should calls like this be changed again to just GetVersion?
The text was updated successfully, but these errors were encountered:
It's intentional. It aligns with libuv (which always uses wide character APIs) and it avoids incompatibilities between different io.js versions and configurations.
Turn the question around: why not write it this way? The ANSI versions exist for backwards compatibility but for any new program (where 'new' means 'written in the last 15 or 20 years') there really is no reason not to use the wide character versions.
Looking through the Windows-specific code, I see lots of instances of
*W
(likeGetVersionW
) methods called explicitly, which forces wide characters. Typically I'd expect use use of undecorated names likeGetVersion
, which lets the compiler configure for or against wide character support (and is future proof!)See: https://github.com/nodejs/io.js/blob/master/src/node_os.cc#L96
Is there any reason why the code is written this way?
There was a commit from @piscisaureus that describes a change from
GetVersionA
toGetVersionW
-- should calls like this be changed again to justGetVersion
?The text was updated successfully, but these errors were encountered: