MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / do_string

Method do_string

Libs/sol/sol.hpp:25345–25356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25343
25344 template <typename E>
25345 protected_function_result do_string(const string_view& code, const basic_environment<E>& env,
25346 const std::string& chunkname = detail::default_chunk_name(), load_mode mode = load_mode::any) {
25347 detail::typical_chunk_name_t basechunkname = {};
25348 const char* chunknametarget = detail::make_chunk_name(code, chunkname, basechunkname);
25349 load_status x = static_cast<load_status>(luaL_loadbufferx(L, code.data(), code.size(), chunknametarget, to_string(mode).c_str()));
25350 if (x != load_status::ok) {
25351 return protected_function_result(L, absolute_index(L, -1), 0, 1, static_cast<call_status>(x));
25352 }
25353 stack_aligned_protected_function pf(L, -1);
25354 set_environment(env, pf);
25355 return pf();
25356 }
25357
25358 protected_function_result do_string(
25359 const string_view& code, const std::string& chunkname = detail::default_chunk_name(), load_mode mode = load_mode::any) {

Callers

nothing calls this directly

Calls 9

make_chunk_nameFunction · 0.85
luaL_loadbufferxFunction · 0.85
to_stringFunction · 0.85
absolute_indexClass · 0.85
set_environmentFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected