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. */
| 4647 | * be called in the context of the rdb_save method of modules implementing new |
| 4648 | * data types. */ |
| 4649 | void 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 | |
| 4661 | saveerr: |
| 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 |
no test coverage detected