Rearranged distribute tracing
[distributed.git] / src / vm / lua.cxx
blob4f529f610a460897052302d43640235eb4dac974
1 //
2 // Copyright (C) 2008 Francesco Salvestrini
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this program; if not, write to the Free Software Foundation, Inc.,
16 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #include "config.h"
21 extern "C" {
22 #include "lua.h"
23 #include "lauxlib.h"
24 #include "lualib.h"
27 #include "misc/trace.h"
28 #include "vm/lua.h"
30 using namespace VM;
32 Lua::Lua(size_t memory) :
33 VM(memory)
35 TR_DBG("Creating Lua virtual machine %p\n", this);
38 Lua::~Lua(void)
40 TR_DBG("Destroying Lua virtual machine %p\n", this);
42 if (state_) {
43 lua_close(state_);
47 bool Lua::run(void)
49 TR_DBG("Running Lua virtual machine %p\n", this);
51 return true;