mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
flesh out load buffer a little bit
This commit is contained in:
parent
c44f577d19
commit
309947d704
|
@ -168,9 +168,8 @@ public:
|
|||
return load_result(L, -1, 1, 1, x);
|
||||
}
|
||||
|
||||
load_result load_buffer(const char *buff, size_t size, const char *name)
|
||||
{
|
||||
load_status x = static_cast<load_status>(luaL_loadbuffer(L, buff, size, name));
|
||||
load_result load_buffer(const char *buff, size_t size, const char *name, const char* mode = nullptr) {
|
||||
load_status x = static_cast<load_status>(luaL_loadbufferx(L, buff, size, name, mode));
|
||||
return load_result(L, -1, 1, 1, x);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user