mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
update sproto, fix bug in sproto.default
This commit is contained in:
@@ -604,6 +604,8 @@ encode_default(const struct sproto_arg *args) {
|
|||||||
lua_pushstring(L, args->tagname);
|
lua_pushstring(L, args->tagname);
|
||||||
if (args->index > 0) {
|
if (args->index > 0) {
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
lua_rawset(L, -3);
|
||||||
|
return SPROTO_CB_NOARRAY;
|
||||||
} else {
|
} else {
|
||||||
switch(args->type) {
|
switch(args->type) {
|
||||||
case SPROTO_TINTEGER:
|
case SPROTO_TINTEGER:
|
||||||
@@ -621,9 +623,9 @@ encode_default(const struct sproto_arg *args) {
|
|||||||
lua_setfield(L, -2, "__type");
|
lua_setfield(L, -2, "__type");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
lua_rawset(L, -3);
|
||||||
|
return SPROTO_CB_NIL;
|
||||||
}
|
}
|
||||||
lua_rawset(L, -3);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user