Like RedisModule_CreatString(), but creates a string starting from a double * instead of taking a buffer and its length. * * The returned string must be released with RedisModule_FreeString() or by * enabling automatic memory management. */
| 1176 | * The returned string must be released with RedisModule_FreeString() or by |
| 1177 | * enabling automatic memory management. */ |
| 1178 | RedisModuleString *RM_CreateStringFromDouble(RedisModuleCtx *ctx, double d) { |
| 1179 | char buf[128]; |
| 1180 | size_t len = d2string(buf,sizeof(buf),d); |
| 1181 | return RM_CreateString(ctx,buf,len); |
| 1182 | } |
| 1183 | |
| 1184 | /* Like RedisModule_CreatString(), but creates a string starting from a long |
| 1185 | * double. |
nothing calls this directly
no test coverage detected