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