Skip to content

Commit c43461a

Browse files
codebytereMylesBorins
authored andcommitted
src: make debug_options getters public
This simplifies requires for those using DebugOptions, since debug_options was defined in src/node_options-inl.h and thus embedders would need to require an extra file to do what could trivially be consolidated into one. PR-URL: #30494 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com>
1 parent 30e2d28 commit c43461a

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/node_options-inl.h

-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ PerIsolateOptions* PerProcessOptions::get_per_isolate_options() {
1313
return per_isolate.get();
1414
}
1515

16-
DebugOptions* EnvironmentOptions::get_debug_options() {
17-
return &debug_options_;
18-
}
19-
20-
const DebugOptions& EnvironmentOptions::debug_options() const {
21-
return debug_options_;
22-
}
23-
2416
EnvironmentOptions* PerIsolateOptions::get_per_env_options() {
2517
return per_env.get();
2618
}

src/node_options.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,9 @@ class EnvironmentOptions : public Options {
172172

173173
std::vector<std::string> user_argv;
174174

175-
inline DebugOptions* get_debug_options();
176-
inline const DebugOptions& debug_options() const;
175+
inline DebugOptions* get_debug_options() { return &debug_options_; }
176+
inline const DebugOptions& debug_options() const { return debug_options_; }
177+
177178
void CheckOptions(std::vector<std::string>* errors) override;
178179

179180
private:

0 commit comments

Comments
 (0)