diff options
author | deva <deva> | 2010-08-12 10:57:04 +0000 |
---|---|---|
committer | deva <deva> | 2010-08-12 10:57:04 +0000 |
commit | d9338083192084613e5530b02710b796252d342b (patch) | |
tree | e0ec2b36e0de62328e5fd5d3b597f6ee71d1b18f /server/src/luaresume.cc | |
parent | dbab8458dcce186e7eb7a114a83f759d7db5445a (diff) |
New scripting system part2.
Diffstat (limited to 'server/src/luaresume.cc')
-rw-r--r-- | server/src/luaresume.cc | 8 |
1 files changed, 4 insertions, 4 deletions
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()); |