MCPcopy Create free account
hub / github.com/ThePhD/sol2 / do_reader

Method do_reader

include/sol/state_view.hpp:291–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289
290 template <typename E>
291 protected_function_result do_reader(lua_Reader reader, void* data, const basic_environment<E>& env,
292 const std::string& chunkname = detail::default_chunk_name(), load_mode mode = load_mode::any) {
293 detail::typical_chunk_name_t basechunkname = {};
294 const char* chunknametarget = detail::make_chunk_name("lua_Reader", chunkname, basechunkname);
295 load_status x = static_cast<load_status>(lua_load(L, reader, data, chunknametarget, to_string(mode).c_str()));
296 if (x != load_status::ok) {
297 return protected_function_result(L, absolute_index(L, -1), 0, 1, static_cast<call_status>(x));
298 }
299 stack_aligned_protected_function pf(L, -1);
300 set_environment(env, pf);
301 return pf();
302 }
303
304 protected_function_result do_reader(
305 lua_Reader reader, void* data, const std::string& chunkname = detail::default_chunk_name(), load_mode mode = load_mode::any) {

Callers

nothing calls this directly

Calls 6

make_chunk_nameFunction · 0.85
lua_loadFunction · 0.85
absolute_indexClass · 0.85
set_environmentFunction · 0.85
to_stringFunction · 0.50

Tested by

no test coverage detected