In the context of the rdb_save method of a module data type, saves a double * value to the RDB file. The double can be a valid number, a NaN or infinity. * It is possible to load back the value with RedisModule_LoadDouble(). */
| 4780 | * value to the RDB file. The double can be a valid number, a NaN or infinity. |
| 4781 | * It is possible to load back the value with RedisModule_LoadDouble(). */ |
| 4782 | void RM_SaveDouble(RedisModuleIO *io, double value) { |
| 4783 | if (io->error) return; |
| 4784 | /* Save opcode. */ |
| 4785 | int retval = rdbSaveLen(io->rio, RDB_MODULE_OPCODE_DOUBLE); |
| 4786 | if (retval == -1) goto saveerr; |
| 4787 | io->bytes += retval; |
| 4788 | /* Save value. */ |
| 4789 | retval = rdbSaveBinaryDoubleValue(io->rio, value); |
| 4790 | if (retval == -1) goto saveerr; |
| 4791 | io->bytes += retval; |
| 4792 | return; |
| 4793 | |
| 4794 | saveerr: |
| 4795 | io->error = 1; |
| 4796 | } |
| 4797 | |
| 4798 | /* In the context of the rdb_save method of a module data type, loads back the |
| 4799 | * double value saved by RedisModule_SaveDouble(). */ |
nothing calls this directly
no test coverage detected