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. */
| 1217 | * The passed context 'ctx' may be NULL if necessary, see the |
| 1218 | * RedisModule_CreateString() documentation for more info. */ |
| 1219 | RedisModuleString *RM_CreateStringFromLongDouble(RedisModuleCtx *ctx, long double ld, int humanfriendly) { |
| 1220 | char buf[MAX_LONG_DOUBLE_CHARS]; |
| 1221 | size_t len = ld2string(buf,sizeof(buf),ld, |
| 1222 | (humanfriendly ? LD_STR_HUMAN : LD_STR_AUTO)); |
| 1223 | return RM_CreateString(ctx,buf,len); |
| 1224 | } |
| 1225 | |
| 1226 | /* Like RedisModule_CreatString(), but creates a string starting from another |
| 1227 | * RedisModuleString. |
nothing calls this directly
no test coverage detected