+int isObjectRepresentableAsLongLong(robj *o, long long *llval) {
+ redisAssert(o->type == REDIS_STRING);
+ if (o->encoding == REDIS_ENCODING_INT) {
+ if (llval) *llval = (long) o->ptr;
+ return REDIS_OK;
+ } else {
+ return string2ll(o->ptr,sdslen(o->ptr),llval) ? REDIS_OK : REDIS_ERR;
+ }
+}
+