Return the length of a string object. * This does NOT includes internal fragmentation or sds unused space. */
| 61 | /* Return the length of a string object. |
| 62 | * This does NOT includes internal fragmentation or sds unused space. */ |
| 63 | size_t getStringObjectLen(robj *o) { |
| 64 | serverAssertWithInfo(NULL,o,o->type == OBJ_STRING); |
| 65 | switch(o->encoding) { |
| 66 | case OBJ_ENCODING_RAW: return sdslen(o->ptr); |
| 67 | case OBJ_ENCODING_EMBSTR: return sdslen(o->ptr); |
| 68 | default: return 0; /* Just integer encoding for now. */ |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | /* Client.reply list dup and free methods. */ |
| 73 | void *dupClientReplyValue(void *o) { |
no test coverage detected