MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / redisProtocolToLuaType_Bulk

Function redisProtocolToLuaType_Bulk

src/scripting.cpp:171–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171char *redisProtocolToLuaType_Bulk(lua_State *lua, char *reply) {
172 char *p = strchr(reply+1,'\r');
173 long long bulklen;
174
175 string2ll(reply+1,p-reply-1,&bulklen);
176 if (bulklen == -1) {
177 lua_pushboolean(lua,0);
178 return p+2;
179 } else {
180 lua_pushlstring(lua,p+2,bulklen);
181 return p+2+bulklen+2;
182 }
183}
184
185char *redisProtocolToLuaType_Status(lua_State *lua, char *reply) {
186 char *p = strchr(reply+1,'\r');

Callers 1

redisProtocolToLuaTypeFunction · 0.85

Calls 3

lua_pushbooleanFunction · 0.85
lua_pushlstringFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected