src: turn embedder api overload into default argument

PR-URL: https://github.com/nodejs/node/pull/43629
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
This commit is contained in:
Alena Khineika 2022-07-26 15:03:27 +02:00 committed by GitHub
parent 67bf6745ce
commit 77e585657f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 13 deletions

View File

@ -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,

View File

@ -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,