# # patch "ChangeLog" # from [52d9f3bbb974e21438d9f45f5b848ef3a9a77835] # to [ba74478d8f8cd6c0f1fc8d1ea581f8498ab6582c] # # patch "lua.cc" # from [77f81c504baafa54e376a9eba1ae9d6257d398e7] # to [7a62477a7767f7aad3d35841c33d96eb86819b8d] # ======================================================================== --- ChangeLog 52d9f3bbb974e21438d9f45f5b848ef3a9a77835 +++ ChangeLog ba74478d8f8cd6c0f1fc8d1ea581f8498ab6582c @@ -1,3 +1,8 @@ +2005-08-11 Nathaniel Smith + + * lua.cc (ok, extract_str, extract_int, extract_double) + (extract_bool): Add more logging. + 2005-08-09 Nathaniel Smith * commands.cc (update): Fix helpful error message to suggest ======================================================================== --- lua.cc 77f81c504baafa54e376a9eba1ae9d6257d398e7 +++ lua.cc 7a62477a7767f7aad3d35841c33d96eb86819b8d @@ -69,6 +69,7 @@ bool ok() { + L(F("Lua::ok(): failed = %i") % failed); return !failed; } @@ -174,6 +175,7 @@ return *this; } str = string(lua_tostring(st, -1), lua_strlen(st, -1)); + L(F("lua: extracted string = %s") % str); return *this; } @@ -187,6 +189,7 @@ return *this; } i = static_cast(lua_tonumber(st, -1)); + L(F("lua: extracted int = %i") % i); return *this; } @@ -200,6 +203,7 @@ return *this; } i = lua_tonumber(st, -1); + L(F("lua: extracted double = %i") % i); return *this; } @@ -214,6 +218,7 @@ return *this; } i = (lua_toboolean(st, -1) == 1); + L(F("lua: extracted bool = %i") % i); return *this; } @@ -336,6 +341,7 @@ Lua & func(string const & fname) { + L(F("loading lua hook %s") % fname); if (!failed) { if (missing_functions.find(fname) != missing_functions.end()) @@ -738,14 +744,14 @@ lua_hooks::hook_expand_date(std::string const & sel, std::string & exp) { - exp.clear(); + exp.clear(); bool res= Lua(st) .func("expand_date") .push_str(sel) .call(1,1) .extract_str(exp) .ok(); - return res && exp.size(); + return res && exp.size(); } bool @@ -766,7 +772,7 @@ bool lua_hooks::hook_get_priv_key(rsa_keypair_id const & k, - base64< arc4 > & priv_key ) + base64< arc4 > & priv_key ) { string key; bool ok = Lua(st)