diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/BLua.cc | 4 | ||||
-rw-r--r-- | lib/LuaHttp.cc | 2 | ||||
-rw-r--r-- | lib/RandISAAC.cc | 1 | ||||
-rw-r--r-- | lib/Socket.cc | 4 | ||||
-rw-r--r-- | lib/SocketClient.cc | 2 |
5 files changed, 9 insertions, 4 deletions
diff --git a/lib/BLua.cc b/lib/BLua.cc index 4642386..9e7057f 100644 --- a/lib/BLua.cc +++ b/lib/BLua.cc @@ -460,6 +460,7 @@ Lua * Lua::Father() { Lua * Lua::spawn_from_thread(lua_State * __L) { Lua * L = new Lua(__L); L->father = Father(); + return L; } void Lua::weaken() { @@ -1190,12 +1191,15 @@ void Lua::openlib(const String & libname, const luaL_reg *l, int nup) { luaL_openlib(L, libname.to_charp(), l, nup); } +/* ***TODO*** handle the new garbage collection system. */ + void Lua::setgcthreshold(int newthreshold) { // lua_setgcthreshold(L, newthreshold); } int Lua::getgcthreshold() { // return lua_getgcthreshold(L); + return 0; } int Lua::getgccount() { diff --git a/lib/LuaHttp.cc b/lib/LuaHttp.cc index be4f143..89e55e7 100644 --- a/lib/LuaHttp.cc +++ b/lib/LuaHttp.cc @@ -247,7 +247,7 @@ int sLua_HttpResponse::HttpResponse_proceed(Lua * L, int n, HttpResponse * res, } else if (i == "server_name") { res->server_name = L->tostring(3); } else if (i == "return_code") { - res->return_code = HttpResponse::return_code_t(L->tonumber(3)); + res->return_code = (HttpResponse::return_code_t)(int)L->tonumber(3); } else if (i == "last_modified") { res->last_modified = L->tonumber(3); } else if (i == "contents") { diff --git a/lib/RandISAAC.cc b/lib/RandISAAC.cc index 69bf2f7..5e71cd6 100644 --- a/lib/RandISAAC.cc +++ b/lib/RandISAAC.cc @@ -33,6 +33,7 @@ MODIFIED: */ #include <stdio.h> +#include <time.h> #include <RandISAAC.h> diff --git a/lib/Socket.cc b/lib/Socket.cc index 21acf3f..56e89c3 100644 --- a/lib/Socket.cc +++ b/lib/Socket.cc @@ -217,7 +217,7 @@ int Socket::GetPort() { } Uint32 Socket::GetAddr() { - uint32_t r; + Uint32 r; struct sockaddr_in localsocketaddr; socklen_t locallen = sizeof(localsocketaddr); @@ -245,7 +245,7 @@ int Socket::GetDistantPort() { } Uint32 Socket::GetDistantAddr() { - uint32_t r; + Uint32 r; struct sockaddr_in distantsockaddr; socklen_t distantlen = sizeof(distantsockaddr); diff --git a/lib/SocketClient.cc b/lib/SocketClient.cc index cc59014..cdb1220 100644 --- a/lib/SocketClient.cc +++ b/lib/SocketClient.cc @@ -75,7 +75,7 @@ void SocketClient::subDo() throw (GeneralException) { c = 0; - if (TaskMan::Event() == Task::Task::EVT_TIMEOUT) { + if (TaskMan::Event() == Task::EVT_TIMEOUT) { status = "Connection timeout."; Suspend(TASK_DONE); } |