update to lua 5.3, remove lua unsigned api

This commit is contained in:
Cloud Wu
2015-01-05 16:25:42 +08:00
parent 4a2b253b40
commit c7b5015e10
76 changed files with 6960 additions and 5058 deletions

View File

@@ -136,7 +136,7 @@ get_dest_string(lua_State *L, int index) {
}
/*
unsigned address
uint32 address
string address
integer type
integer session
@@ -147,7 +147,7 @@ get_dest_string(lua_State *L, int index) {
static int
_send(lua_State *L) {
struct skynet_context * context = lua_touserdata(L, lua_upvalueindex(1));
uint32_t dest = lua_tounsigned(L, 1);
uint32_t dest = (uint32_t)lua_tointeger(L, 1);
const char * dest_string = NULL;
if (dest == 0) {
dest_string = get_dest_string(L, 1);
@@ -201,12 +201,12 @@ _send(lua_State *L) {
static int
_redirect(lua_State *L) {
struct skynet_context * context = lua_touserdata(L, lua_upvalueindex(1));
uint32_t dest = lua_tounsigned(L,1);
uint32_t dest = (uint32_t)lua_tointeger(L,1);
const char * dest_string = NULL;
if (dest == 0) {
dest_string = get_dest_string(L, 1);
}
uint32_t source = luaL_checkunsigned(L,2);
uint32_t source = (uint32_t)luaL_checkinteger(L,2);
int type = luaL_checkinteger(L,3);
int session = luaL_checkinteger(L,4);
@@ -262,7 +262,7 @@ _tostring(lua_State *L) {
static int
_harbor(lua_State *L) {
struct skynet_context * context = lua_touserdata(L, lua_upvalueindex(1));
uint32_t handle = luaL_checkunsigned(L,1);
uint32_t handle = (uint32_t)luaL_checkinteger(L,1);
int harbor = 0;
int remote = skynet_isremote(context, handle, &harbor);
lua_pushinteger(L,harbor);