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

Function RM_LoadStringBuffer

src/module.cpp:4882–4884  ·  view source on GitHub ↗

Like RedisModule_LoadString() but returns an heap allocated string that * was allocated with RedisModule_Alloc(), and can be resized or freed with * RedisModule_Realloc() or RedisModule_Free(). * * The size of the string is stored at '*lenptr' if not NULL. * The returned string is not automatically NULL terminated, it is loaded * exactly as it was stored inside the RDB file. */

Source from the content-addressed store, hash-verified

4880 * The returned string is not automatically NULL terminated, it is loaded
4881 * exactly as it was stored inside the RDB file. */
4882char *RM_LoadStringBuffer(RedisModuleIO *io, size_t *lenptr) {
4883 return (char*)moduleLoadString(io,1,lenptr);
4884}
4885
4886/* In the context of the rdb_save method of a module data type, saves a double
4887 * value to the RDB file. The double can be a valid number, a NaN or infinity.

Callers 1

RM_LoadLongDoubleFunction · 0.85

Calls 1

moduleLoadStringFunction · 0.85

Tested by

no test coverage detected