From d9338083192084613e5530b02710b796252d342b Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 12 Aug 2010 10:57:04 +0000 Subject: New scripting system part2. --- server/src/luaresume.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/src/luaresume.cc') diff --git a/server/src/luaresume.cc b/server/src/luaresume.cc index eb6d90b..a74f1f5 100644 --- a/server/src/luaresume.cc +++ b/server/src/luaresume.cc @@ -34,7 +34,7 @@ #define GLOBAL_POINTER "_pracroGlobalLUAObjectPointerThisShouldBeANameThatIsNotAccidentallyOverwritten" -static int _getValue(lua_State *L) +static int _value(lua_State *L) { Pracro::checkParameters(L, Pracro::T_STRING, @@ -51,7 +51,7 @@ static int _getValue(lua_State *L) return 1; } - std::string value = lua->getValue(name); + std::string value = lua->value(name); lua_pushstring(L, value.c_str()); return 1; @@ -71,7 +71,7 @@ LUAResume::LUAResume(Commit &c) lua_pushlightuserdata(L, this); // Push the pointer to 'this' instance lua_setglobal(L, GLOBAL_POINTER); // Assign it to a global lua var. - lua_register(L, "getValue", _getValue); + lua_register(L, "value", _value); } LUAResume::~LUAResume() @@ -79,7 +79,7 @@ LUAResume::~LUAResume() lua_close(L); } -std::string LUAResume::getValue(std::string name) +std::string LUAResume::value(std::string name) { if(commit.fields.find(name) == commit.fields.end()) { ERR(luaresume, "LUAResume: No such field '%s'\n", name.c_str()); -- cgit v1.2.3