Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zlib: reduce number of static internal methods #20674

Closed
wants to merge 2 commits into from

Conversation

addaleax
Copy link
Member

There really isn’t any good reason for these to be static methods,
it just adds one layer of indirection (when reading the code,
not in a way that affects behaviour).

Addresses a TODO comment introduced in c072057.

Refs: c072057

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib subsystem. labels May 11, 2018
src/node_zlib.cc Outdated
static void Error(ZCtx* ctx, const char* message) {
Environment* env = ctx->env();

// TODO(addaleax): Switch to modern error system.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe be a little more explicit what that is.

There really isn’t any good reason for these to be static methods,
it just adds one layer of indirection (when reading the code,
not in a way that affects behaviour).

Addresses a `TODO` comment introduced in c072057.

Refs: nodejs@c072057
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 13, 2018
@addaleax
Copy link
Member Author

@addaleax
Copy link
Member Author

@apapirovski
Copy link
Member

Landed in 2b8cd93

apapirovski pushed a commit that referenced this pull request May 16, 2018
There really isn’t any good reason for these to be static methods,
it just adds one layer of indirection (when reading the code,
not in a way that affects behaviour).

Addresses a `TODO` comment introduced in c072057.

PR-URL: #20674
Refs: c072057
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 22, 2018
There really isn’t any good reason for these to be static methods,
it just adds one layer of indirection (when reading the code,
not in a way that affects behaviour).

Addresses a `TODO` comment introduced in c072057.

PR-URL: #20674
Refs: c072057
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@addaleax addaleax mentioned this pull request May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants