GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Win32 method name conventions? · Issue #2335 · nodejs/node

Win32 method name conventions? #2335

New issue
Copy link
New issue
Copy link
Closed
Closed
Win32 method name conventions?#2335
Copy link
Labels
questionIssues asking questions about Node.js.windowsIssues and PRs related to the Windows platform.

Description

@LPGhatguy
LPGhatguy
opened on Aug 9, 2015
Issue body actions

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!)

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 to GetVersionW -- should calls like this be changed again to just GetVersion?

Activity

  1. thefourtheye
    added
    questionIssues asking questions about Node.js.
    windowsIssues and PRs related to the Windows platform.
    on Aug 9, 2015
  2. bnoordhuis commented on Aug 9, 2015

    @bnoordhuis
    bnoordhuis
    on Aug 9, 2015
    Member
    More actions

    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.

    Closing, hope this answers your question.

  3. bnoordhuis
    closed this as completedon Aug 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.