Skip to content

Commit

Permalink
src: turn embedder api overload into default argument
Browse files Browse the repository at this point in the history
PR-URL: #43629
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
  • Loading branch information
alenakhineika authored Jul 26, 2022
1 parent 67bf674 commit 77e5856
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
7 changes: 0 additions & 7 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -862,13 +862,6 @@ int ProcessGlobalArgs(std::vector<std::string>* args,

static std::atomic_bool init_called{false};

int InitializeNodeWithArgs(std::vector<std::string>* argv,
std::vector<std::string>* exec_argv,
std::vector<std::string>* errors) {
return InitializeNodeWithArgs(argv, exec_argv, errors,
ProcessFlags::kNoFlags);
}

int InitializeNodeWithArgs(std::vector<std::string>* argv,
std::vector<std::string>* exec_argv,
std::vector<std::string>* errors,
Expand Down
7 changes: 1 addition & 6 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,11 @@ NODE_EXTERN int Stop(Environment* env);
// from argv, fill exec_argv, and possibly add errors resulting from parsing
// the arguments to `errors`. The return value is a suggested exit code for the
// program; If it is 0, then initializing Node.js succeeded.
NODE_EXTERN int InitializeNodeWithArgs(
std::vector<std::string>* argv,
std::vector<std::string>* exec_argv,
std::vector<std::string>* errors);
// TODO(zcbenz): Turn above overloaded version into below's default argument.
NODE_EXTERN int InitializeNodeWithArgs(
std::vector<std::string>* argv,
std::vector<std::string>* exec_argv,
std::vector<std::string>* errors,
ProcessFlags::Flags flags);
ProcessFlags::Flags flags = ProcessFlags::kNoFlags);

enum OptionEnvvarSettings {
kAllowedInEnvironment,
Expand Down

0 comments on commit 77e5856

Please sign in to comment.