mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Meh, who needs "eval". It's technically right, but I think evaluate might be for shorter lines and stuff... who knows.
This commit is contained in:
parent
0da6ff4690
commit
2b4f9cc24c
|
@ -115,20 +115,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void eval(const std::string& code) {
|
||||
script(code);
|
||||
}
|
||||
|
||||
void script(const std::string& code) {
|
||||
if(luaL_dostring(L.get(), code.c_str())) {
|
||||
lua_error(L.get());
|
||||
}
|
||||
}
|
||||
|
||||
void eval_file(const std::string& filename) {
|
||||
script_file(filename);
|
||||
}
|
||||
|
||||
void script_file(const std::string& filename) {
|
||||
if (luaL_dofile(L.get(), filename.c_str())) {
|
||||
lua_error(L.get());
|
||||
|
|
Loading…
Reference in New Issue
Block a user