MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Init

Function Init

src/hx/StdLibs.cpp:202–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200{
201 static std::string initReturnBuffer;
202 const char *Init(bool stayAttached)
203 {
204 try
205 {
206 __hxcpp_lib_main();
207 if (!stayAttached)
208 SetTopOfStack(0,true);
209 return 0;
210 }
211 catch(Dynamic e)
212 {
213 HX_TOP_OF_STACK
214 if (!stayAttached)
215 {
216 initReturnBuffer = e->toString().utf8_str();
217 SetTopOfStack(0,true);
218 return initReturnBuffer.c_str();
219 }
220 return e->toString().utf8_str();
221 }
222 }
223}
224
225// --- System ---------------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls 4

SetTopOfStackFunction · 0.85
utf8_strMethod · 0.80
c_strMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected