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(). */
| 4854 | * value to the RDB file. The double can be a valid number, a NaN or infinity. |
| 4855 | * It is possible to load back the value with RedisModule_LoadLongDouble(). */ |
| 4856 | void RM_SaveLongDouble(RedisModuleIO *io, long double value) { |
| 4857 | if (io->error) return; |
| 4858 | char buf[MAX_LONG_DOUBLE_CHARS]; |
| 4859 | /* Long double has different number of bits in different platforms, so we |
| 4860 | * save it as a string type. */ |
| 4861 | size_t len = ld2string(buf,sizeof(buf),value,LD_STR_HEX); |
| 4862 | RM_SaveStringBuffer(io,buf,len); |
| 4863 | } |
| 4864 | |
| 4865 | /* In the context of the rdb_save method of a module data type, loads back the |
| 4866 | * long double value saved by RedisModule_SaveLongDouble(). */ |
nothing calls this directly
no test coverage detected