mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
update to lua 5.3, remove lua unsigned api
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user