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

Function RM_SaveUnsigned

app/redis-6.2.6/src/module.c:4649–4663  ·  view source on GitHub ↗

Save an unsigned 64 bit value into the RDB file. This function should only * be called in the context of the rdb_save method of modules implementing new * data types. */

Source from the content-addressed store, hash-verified

4647 * be called in the context of the rdb_save method of modules implementing new
4648 * data types. */
4649void RM_SaveUnsigned(RedisModuleIO *io, uint64_t value) {
4650 if (io->error) return;
4651 /* Save opcode. */
4652 int retval = rdbSaveLen(io->rio, RDB_MODULE_OPCODE_UINT);
4653 if (retval == -1) goto saveerr;
4654 io->bytes += retval;
4655 /* Save value. */
4656 retval = rdbSaveLen(io->rio, value);
4657 if (retval == -1) goto saveerr;
4658 io->bytes += retval;
4659 return;
4660
4661saveerr:
4662 io->error = 1;
4663}
4664
4665/* Load an unsigned 64 bit value from the RDB file. This function should only
4666 * be called in the context of the `rdb_load` method of modules implementing

Callers 1

RM_SaveSignedFunction · 0.85

Calls 1

rdbSaveLenFunction · 0.85

Tested by

no test coverage detected