mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Multi bulk to Lua table now working
This commit is contained in:
parent
3791000f15
commit
10a6da7af4
@ -98,17 +98,15 @@ char *redisProtocolToLuaType_MultiBulk(lua_State *lua, char *reply) {
|
||||
long long mbulklen;
|
||||
int j = 0;
|
||||
|
||||
printf("--%s-- (%d)\n", reply,(int)(p-reply-1));
|
||||
string2ll(reply+1,p-reply-1,&mbulklen);
|
||||
p += 2;
|
||||
if (mbulklen == -1) {
|
||||
lua_pushnil(lua);
|
||||
return p;
|
||||
}
|
||||
printf("BL: %lld\n", mbulklen);
|
||||
lua_newtable(lua);
|
||||
for (j = 0; j < mbulklen; j++) {
|
||||
lua_pushnumber(lua,j);
|
||||
lua_pushnumber(lua,j+1);
|
||||
p = redisProtocolToLuaType(lua,p);
|
||||
lua_settable(lua,-3);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user