source:
orxonox.OLD/branches/script_engine/src/lib/script_engine/Script.cc
@
7975
Last change on this file since 7975 was 7975, checked in by snellen, 18 years ago | |
---|---|
File size: 332 bytes |
Line | |
---|---|
1 | #include "Script.h" |
2 | |
3 | |
4 | Script::Script() |
5 | { |
6 | luaState = lua_open(); |
7 | |
8 | luaopen_base(luaState); |
9 | luaopen_table(luaState); |
10 | luaopen_io(luaState); |
11 | luaopen_string(luaState); |
12 | luaopen_math(luaState); |
13 | luaopen_debug(luaState); |
14 | |
15 | } |
16 | |
17 | |
18 | Script::~Script() |
19 | { |
20 | lua_setgcthreshold(luaState, 0); // collected garbage |
21 | lua_close(luaState); |
22 | } |
Note: See TracBrowser
for help on using the repository browser.