In the context of the rdb_save method of a module data type, saves a float * value to the RDB file. The float can be a valid number, a NaN or infinity. * It is possible to load back the value with RedisModule_LoadFloat(). */
| 4817 | * value to the RDB file. The float can be a valid number, a NaN or infinity. |
| 4818 | * It is possible to load back the value with RedisModule_LoadFloat(). */ |
| 4819 | void RM_SaveFloat(RedisModuleIO *io, float value) { |
| 4820 | if (io->error) return; |
| 4821 | /* Save opcode. */ |
| 4822 | int retval = rdbSaveLen(io->rio, RDB_MODULE_OPCODE_FLOAT); |
| 4823 | if (retval == -1) goto saveerr; |
| 4824 | io->bytes += retval; |
| 4825 | /* Save value. */ |
| 4826 | retval = rdbSaveBinaryFloatValue(io->rio, value); |
| 4827 | if (retval == -1) goto saveerr; |
| 4828 | io->bytes += retval; |
| 4829 | return; |
| 4830 | |
| 4831 | saveerr: |
| 4832 | io->error = 1; |
| 4833 | } |
| 4834 | |
| 4835 | /* In the context of the rdb_save method of a module data type, loads back the |
| 4836 | * float value saved by RedisModule_SaveFloat(). */ |
nothing calls this directly
no test coverage detected