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

Function getDoubleFromObjectOrReply

src/object.cpp:676–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674}
675
676int getDoubleFromObjectOrReply(client *c, robj *o, double *target, const char *msg) {
677 double value;
678 if (getDoubleFromObject(o, &value) != C_OK) {
679 if (msg != NULL) {
680 addReplyError(c,(char*)msg);
681 } else {
682 addReplyError(c,"value is not a valid float");
683 }
684 return C_ERR;
685 }
686 *target = value;
687 return C_OK;
688}
689
690int getLongDoubleFromObject(robj *o, long double *target) {
691 long double value;

Callers 5

extractLongLatOrReplyFunction · 0.85
extractDistanceOrReplyFunction · 0.85
extractBoxOrReplyFunction · 0.85
zaddGenericCommandFunction · 0.85

Calls 2

getDoubleFromObjectFunction · 0.85
addReplyErrorFunction · 0.85

Tested by

no test coverage detected