MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rdbSaveBinaryDoubleValue

Function rdbSaveBinaryDoubleValue

app/redis-6.2.6/src/rdb.c:635–638  ·  view source on GitHub ↗

Saves a double for RDB 8 or greater, where IE754 binary64 format is assumed. * We just make sure the integer is always stored in little endian, otherwise * the value is copied verbatim from memory to disk. * * Return -1 on error, the size of the serialized value on success. */

Source from the content-addressed store, hash-verified

633 *
634 * Return -1 on error, the size of the serialized value on success. */
635int rdbSaveBinaryDoubleValue(rio *rdb, double val) {
636 memrev64ifbe(&val);
637 return rdbWriteRaw(rdb,&val,sizeof(val));
638}
639
640/* Loads a double from RDB 8 or greater. See rdbSaveBinaryDoubleValue() for
641 * more info. On error -1 is returned, otherwise 0. */

Callers 2

rdbSaveObjectFunction · 0.85
RM_SaveDoubleFunction · 0.85

Calls 1

rdbWriteRawFunction · 0.85

Tested by

no test coverage detected