MCPcopy Create free account
hub / github.com/crownengine/crown / console_command_script

Function console_command_script

src/lua/lua_environment.cpp:648–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

646}
647
648static void console_command_script(ConsoleServer &cs, u32 client_id, const char *json, void *user_data)
649{
650 CE_UNUSED_2(cs, client_id);
651 TempAllocator1024 ta;
652 JsonObject obj(ta);
653 DynamicString script(default_allocator());
654
655 sjson::parse(obj, json);
656 sjson::parse_verbatim(script, obj["script"]);
657
658 ((LuaEnvironment *)user_data)->execute_string(script.c_str());
659}
660
661static void do_REPL(LuaEnvironment *env, const char *lua)
662{

Callers

nothing calls this directly

Calls 4

parse_verbatimFunction · 0.85
execute_stringMethod · 0.80
parseFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected