Like RedisModule_CreatString(), but creates a string starting from a long * double. * * The returned string must be released with RedisModule_FreeString() or by * enabling automatic memory management. * * The passed context 'ctx' may be NULL if necessary, see the * RedisModule_CreateString() documentation for more info. */
| 1190 | * The passed context 'ctx' may be NULL if necessary, see the |
| 1191 | * RedisModule_CreateString() documentation for more info. */ |
| 1192 | RedisModuleString *RM_CreateStringFromLongDouble(RedisModuleCtx *ctx, long double ld, int humanfriendly) { |
| 1193 | char buf[MAX_LONG_DOUBLE_CHARS]; |
| 1194 | size_t len = ld2string(buf,sizeof(buf),ld, |
| 1195 | (humanfriendly ? LD_STR_HUMAN : LD_STR_AUTO)); |
| 1196 | return RM_CreateString(ctx,buf,len); |
| 1197 | } |
| 1198 | |
| 1199 | /* Like RedisModule_CreatString(), but creates a string starting from another |
| 1200 | * RedisModuleString. |
nothing calls this directly
no test coverage detected