| 451 | } |
| 452 | |
| 453 | int isObjectRepresentableAsLongLong(robj *o, long long *llval) { |
| 454 | serverAssertWithInfo(NULL,o,o->type == OBJ_STRING); |
| 455 | if (o->encoding == OBJ_ENCODING_INT) { |
| 456 | if (llval) *llval = (long) ptrFromObj(o); |
| 457 | return C_OK; |
| 458 | } else { |
| 459 | return isSdsRepresentableAsLongLong(szFromObj(o),llval); |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | /* Optimize the SDS string inside the string object to require little space, |
| 464 | * in case there is more than 10% of free space at the end of the SDS |
nothing calls this directly
no test coverage detected