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

Function rdbLoadBinaryDoubleValue

src/rdb.cpp:656–660  ·  view source on GitHub ↗

Loads a double from RDB 8 or greater. See rdbSaveBinaryDoubleValue() for * more info. On error -1 is returned, otherwise 0. */

Source from the content-addressed store, hash-verified

654/* Loads a double from RDB 8 or greater. See rdbSaveBinaryDoubleValue() for
655 * more info. On error -1 is returned, otherwise 0. */
656int rdbLoadBinaryDoubleValue(rio *rdb, double *val) {
657 if (rioRead(rdb,val,sizeof(*val)) == 0) return -1;
658 memrev64ifbe(val);
659 return 0;
660}
661
662/* Like rdbSaveBinaryDoubleValue() but single precision. */
663int rdbSaveBinaryFloatValue(rio *rdb, float val) {

Callers 3

rdbLoadCheckModuleValueFunction · 0.85
rdbLoadObjectFunction · 0.85
RM_LoadDoubleFunction · 0.85

Calls 1

rioReadFunction · 0.85

Tested by

no test coverage detected