MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / RM_StringToLongDouble

Function RM_StringToLongDouble

src/module.cpp:1404–1407  ·  view source on GitHub ↗

Convert the string into a long double, storing it at `*ld`. * Returns REDISMODULE_OK on success or REDISMODULE_ERR if the string is * not a valid string representation of a double value. */

Source from the content-addressed store, hash-verified

1402 * Returns REDISMODULE_OK on success or REDISMODULE_ERR if the string is
1403 * not a valid string representation of a double value. */
1404int RM_StringToLongDouble(const RedisModuleString *str, long double *ld) {
1405 int retval = string2ld(szFromObj(str),sdslen(szFromObj(str)),ld);
1406 return retval ? REDISMODULE_OK : REDISMODULE_ERR;
1407}
1408
1409/* Convert the string into a stream ID, storing it at `*id`.
1410 * Returns REDISMODULE_OK on success and returns REDISMODULE_ERR if the string

Callers

nothing calls this directly

Calls 3

string2ldFunction · 0.85
szFromObjFunction · 0.85
sdslenFunction · 0.85

Tested by

no test coverage detected