| 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) { |
nothing calls this directly
no test coverage detected