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. */
| 4752 | * be called in the context of the rdb_save method of modules implementing new |
| 4753 | * data types. */ |
| 4754 | void RM_SaveUnsigned(RedisModuleIO *io, uint64_t value) { |
| 4755 | if (io->error) return; |
| 4756 | /* Save opcode. */ |
| 4757 | int retval = rdbSaveLen(io->prio, RDB_MODULE_OPCODE_UINT); |
| 4758 | if (retval == -1) goto saveerr; |
| 4759 | io->bytes += retval; |
| 4760 | /* Save value. */ |
| 4761 | retval = rdbSaveLen(io->prio, value); |
| 4762 | if (retval == -1) goto saveerr; |
| 4763 | io->bytes += retval; |
| 4764 | return; |
| 4765 | |
| 4766 | saveerr: |
| 4767 | io->error = 1; |
| 4768 | } |
| 4769 | |
| 4770 | /* Load an unsigned 64 bit value from the RDB file. This function should only |
| 4771 | * be called in the context of the `rdb_load` method of modules implementing |
no test coverage detected