From fbba835d7efaa4ee1d28bf5c7e2232e53d84af5e Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 5 Jul 2010 09:01:54 +0000 Subject: Remove PRACRO_ prefix from debug macros. --- server/src/luaresume.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'server/src/luaresume.cc') diff --git a/server/src/luaresume.cc b/server/src/luaresume.cc index 099c3bd..eb6d90b 100644 --- a/server/src/luaresume.cc +++ b/server/src/luaresume.cc @@ -62,7 +62,7 @@ LUAResume::LUAResume(Commit &c) { L = luaL_newstate(); if(L == NULL) { - PRACRO_ERR(luaresume, "Could not create LUA state.\n"); + ERR(luaresume, "Could not create LUA state.\n"); return; } @@ -82,7 +82,7 @@ LUAResume::~LUAResume() std::string LUAResume::getValue(std::string name) { if(commit.fields.find(name) == commit.fields.end()) { - PRACRO_ERR(luaresume, "LUAResume: No such field '%s'\n", name.c_str()); + ERR(luaresume, "LUAResume: No such field '%s'\n", name.c_str()); return ""; } @@ -92,11 +92,11 @@ std::string LUAResume::getValue(std::string name) std::string LUAResume::run(std::string program) { if(L == NULL) { - PRACRO_ERR(luaresume, "LUA state not initialized!"); + ERR(luaresume, "LUA state not initialized!"); return false; } - PRACRO_DEBUG(luaresume, "Running %s\n", program.c_str()); + DEBUG(luaresume, "Running %s\n", program.c_str()); /* lua_pushstring(L, value.toStdString().c_str()); @@ -110,23 +110,23 @@ std::string LUAResume::run(std::string program) if(luaL_loadbuffer(L, program.c_str(), program.size(), "lua resume generator")) { - PRACRO_ERR(luaresume, "loadbufer: %s\n", lua_tostring(L, lua_gettop(L))); + ERR(luaresume, "loadbufer: %s\n", lua_tostring(L, lua_gettop(L))); return false; } // Run the loaded code if(lua_pcall(L, 0, LUA_MULTRET, 0)) { - PRACRO_ERR(luaresume, "pcall: %s\n" , lua_tostring(L, lua_gettop(L))); + ERR(luaresume, "pcall: %s\n" , lua_tostring(L, lua_gettop(L))); return false; } if(top != lua_gettop(L) - 1) { - PRACRO_ERR(luaresume, "Program did not return a single value.\n"); + ERR(luaresume, "Program did not return a single value.\n"); return false; } if(lua_isstring(L, lua_gettop(L)) == false) { - PRACRO_ERR(luaresume, "Program did not return a string value.\n"); + ERR(luaresume, "Program did not return a string value.\n"); return false; } @@ -138,5 +138,5 @@ std::string LUAResume::run(std::string program) void LUAResume::error(std::string message) { - PRACRO_ERR(luaresume, "LUA ERROR: %s\n", message.c_str()); + ERR(luaresume, "LUA ERROR: %s\n", message.c_str()); } -- cgit v1.2.3