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(). */
| 4925 | * value to the RDB file. The float can be a valid number, a NaN or infinity. |
| 4926 | * It is possible to load back the value with RedisModule_LoadFloat(). */ |
| 4927 | void RM_SaveFloat(RedisModuleIO *io, float value) { |
| 4928 | if (io->error) return; |
| 4929 | /* Save opcode. */ |
| 4930 | int retval = rdbSaveLen(io->prio, RDB_MODULE_OPCODE_FLOAT); |
| 4931 | if (retval == -1) goto saveerr; |
| 4932 | io->bytes += retval; |
| 4933 | /* Save value. */ |
| 4934 | retval = rdbSaveBinaryFloatValue(io->prio, value); |
| 4935 | if (retval == -1) goto saveerr; |
| 4936 | io->bytes += retval; |
| 4937 | return; |
| 4938 | |
| 4939 | saveerr: |
| 4940 | io->error = 1; |
| 4941 | } |
| 4942 | |
| 4943 | /* In the context of the rdb_save method of a module data type, loads back the |
| 4944 | * float value saved by RedisModule_SaveFloat(). */ |
nothing calls this directly
no test coverage detected