MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getStringObjectLen

Function getStringObjectLen

app/redis-6.2.6/src/networking.c:63–70  ·  view source on GitHub ↗

Return the length of a string object. * This does NOT includes internal fragmentation or sds unused space. */

Source from the content-addressed store, hash-verified

61/* Return the length of a string object.
62 * This does NOT includes internal fragmentation or sds unused space. */
63size_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. */
73void *dupClientReplyValue(void *o) {

Callers 2

Calls 1

sdslenFunction · 0.85

Tested by

no test coverage detected