Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit ba09409

Browse files
deanmindutny
authored andcommitted
src: export additional startup functions
This allows embedders enough control to initialize node, run the event loop, and cleanly exit (including calling handlers). Signed-off-by: Fedor Indutny <[email protected]>
1 parent 4c48df5 commit ba09409

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/node.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,22 @@ namespace node {
170170
NODE_EXTERN extern bool no_deprecation;
171171

172172
NODE_EXTERN int Start(int argc, char *argv[]);
173+
NODE_EXTERN void Init(int* argc,
174+
const char** argv,
175+
int* exec_argc,
176+
const char*** exec_argv);
177+
178+
class Environment;
179+
180+
NODE_EXTERN Environment* CreateEnvironment(v8::Isolate* isolate,
181+
v8::Handle<v8::Context> context,
182+
int argc,
183+
const char* const* argv,
184+
int exec_argc,
185+
const char* const* exec_argv);
186+
NODE_EXTERN void EmitBeforeExit(Environment* env);
187+
NODE_EXTERN int EmitExit(Environment* env);
188+
NODE_EXTERN void RunAtExit(Environment* env);
173189

174190
/* Converts a unixtime to V8 Date */
175191
#define NODE_UNIXTIME_V8(t) v8::Date::New(v8::Isolate::GetCurrent(), \

0 commit comments

Comments
 (0)