In the context of the rdb_save method of a module data type, saves a long 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_LoadLongDouble(). */
| 4963 | * value to the RDB file. The double can be a valid number, a NaN or infinity. |
| 4964 | * It is possible to load back the value with RedisModule_LoadLongDouble(). */ |
| 4965 | void RM_SaveLongDouble(RedisModuleIO *io, long double value) { |
| 4966 | if (io->error) return; |
| 4967 | char buf[MAX_LONG_DOUBLE_CHARS]; |
| 4968 | /* Long double has different number of bits in different platforms, so we |
| 4969 | * save it as a string type. */ |
| 4970 | size_t len = ld2string(buf,sizeof(buf),value,LD_STR_HEX); |
| 4971 | RM_SaveStringBuffer(io,buf,len); |
| 4972 | } |
| 4973 | |
| 4974 | /* In the context of the rdb_save method of a module data type, loads back the |
| 4975 | * long double value saved by RedisModule_SaveLongDouble(). */ |
nothing calls this directly
no test coverage detected