MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / basic_insert_dump_writer

Function basic_insert_dump_writer

extlibs/sol3/include/sol/sol.hpp:3347–3362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3345
3346 template <typename Container>
3347 inline int basic_insert_dump_writer(lua_State*, const void* memory, size_t memory_size, void* userdata) {
3348 using storage_t = Container;
3349 const std::byte* p_code = static_cast<const std::byte*>(memory);
3350 storage_t& bc = *static_cast<storage_t*>(userdata);
3351#if defined(SOL_NO_EXCEPTIONS) && SOL_NO_EXCEPTIONS != 0
3352 bc.insert(bc.cend(), p_code, p_code + memory_size);
3353#else
3354 try {
3355 bc.insert(bc.cend(), p_code, p_code + memory_size);
3356 }
3357 catch (...) {
3358 return -1;
3359 }
3360#endif
3361 return 0;
3362 }
3363
3364 using bytecode = basic_bytecode<>;
3365

Callers

nothing calls this directly

Calls 2

insertMethod · 0.45
cendMethod · 0.45

Tested by

no test coverage detected