mirror of https://mirror.osredm.com/root/redis.git
String: use new sdigits10() API in stringObjectLen().
Should be much faster, and regardless, the code is more obvious now compared to generating a string just to get the return value of the ll2stirng() function.
This commit is contained in:
parent
0e5e8ca9e6
commit
4f56f035a7
|
@ -529,9 +529,7 @@ size_t stringObjectLen(robj *o) {
|
|||
if (sdsEncodedObject(o)) {
|
||||
return sdslen(o->ptr);
|
||||
} else {
|
||||
char buf[32];
|
||||
|
||||
return ll2string(buf,32,(long)o->ptr);
|
||||
return sdigits10((long)o->ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue