mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
add load_buffer function
This commit is contained in:
parent
1c61773354
commit
c44f577d19
|
@ -168,6 +168,12 @@ public:
|
||||||
return load_result(L, -1, 1, 1, x);
|
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));
|
||||||
|
return load_result(L, -1, 1, 1, x);
|
||||||
|
}
|
||||||
|
|
||||||
iterator begin () const {
|
iterator begin () const {
|
||||||
return global.begin();
|
return global.begin();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user