MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getPositiveLongFromObjectOrReply

Function getPositiveLongFromObjectOrReply

src/object.cpp:828–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826}
827
828int getPositiveLongFromObjectOrReply(client *c, robj *o, long *target, const char *msg) {
829 if (msg) {
830 return getRangeLongFromObjectOrReply(c, o, 0, LONG_MAX, target, msg);
831 } else {
832 return getRangeLongFromObjectOrReply(c, o, 0, LONG_MAX, target, "value is out of range, must be positive");
833 }
834}
835
836int getIntFromObjectOrReply(client *c, robj *o, int *target, const char *msg) {
837 long value;

Callers 4

spopWithCountCommandFunction · 0.85
debugCommandFunction · 0.85
popGenericCommandFunction · 0.85
lposCommandFunction · 0.85

Calls 1

Tested by

no test coverage detected