MCPcopy Create free account
hub / github.com/F-Stack/f-stack / RM_CreateStringFromDouble

Function RM_CreateStringFromDouble

app/redis-6.2.6/src/module.c:1178–1182  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

1176 * The returned string must be released with RedisModule_FreeString() or by
1177 * enabling automatic memory management. */
1178RedisModuleString *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.

Callers

nothing calls this directly

Calls 2

d2stringFunction · 0.85
RM_CreateStringFunction · 0.85

Tested by

no test coverage detected