Like RedisModule_CreatString(), but creates a string starting from another * RedisModuleString. * * 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. */
| 1232 | * The passed context 'ctx' may be NULL if necessary, see the |
| 1233 | * RedisModule_CreateString() documentation for more info. */ |
| 1234 | RedisModuleString *RM_CreateStringFromString(RedisModuleCtx *ctx, const RedisModuleString *str) { |
| 1235 | RedisModuleString *o = dupStringObject(str); |
| 1236 | if (ctx != NULL) autoMemoryAdd(ctx,REDISMODULE_AM_STRING,o); |
| 1237 | return o; |
| 1238 | } |
| 1239 | |
| 1240 | /* Creates a string from a stream ID. The returned string must be released with |
| 1241 | * RedisModule_FreeString(), unless automatic memory is enabled. |
no test coverage detected