Get Redis protocol from 'reply' and appends it in human readable form to * the passed SDS string 'o'. * * Note that the SDS string is passed by reference (pointer of pointer to * char*) so that we can return a modified pointer, as for SDS semantics. */
| 2320 | * Note that the SDS string is passed by reference (pointer of pointer to |
| 2321 | * char*) so that we can return a modified pointer, as for SDS semantics. */ |
| 2322 | char *ldbRedisProtocolToHuman(sds *o, char *reply) { |
| 2323 | char *p = reply; |
| 2324 | switch(*p) { |
| 2325 | case ':': p = ldbRedisProtocolToHuman_Int(o,reply); break; |
| 2326 | case '$': p = ldbRedisProtocolToHuman_Bulk(o,reply); break; |
| 2327 | case '+': p = ldbRedisProtocolToHuman_Status(o,reply); break; |
| 2328 | case '-': p = ldbRedisProtocolToHuman_Status(o,reply); break; |
| 2329 | case '*': p = ldbRedisProtocolToHuman_MultiBulk(o,reply); break; |
| 2330 | case '~': p = ldbRedisProtocolToHuman_Set(o,reply); break; |
| 2331 | case '%': p = ldbRedisProtocolToHuman_Map(o,reply); break; |
| 2332 | case '_': p = ldbRedisProtocolToHuman_Null(o,reply); break; |
| 2333 | case '#': p = ldbRedisProtocolToHuman_Bool(o,reply); break; |
| 2334 | case ',': p = ldbRedisProtocolToHuman_Double(o,reply); break; |
| 2335 | } |
| 2336 | return p; |
| 2337 | } |
| 2338 | |
| 2339 | /* The following functions are helpers for ldbRedisProtocolToHuman(), each |
| 2340 | * take care of a given Redis return type. */ |
no test coverage detected