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. */
| 1205 | * The passed context 'ctx' may be NULL if necessary, see the |
| 1206 | * RedisModule_CreateString() documentation for more info. */ |
| 1207 | RedisModuleString *RM_CreateStringFromString(RedisModuleCtx *ctx, const RedisModuleString *str) { |
| 1208 | RedisModuleString *o = dupStringObject(str); |
| 1209 | if (ctx != NULL) autoMemoryAdd(ctx,REDISMODULE_AM_STRING,o); |
| 1210 | return o; |
| 1211 | } |
| 1212 | |
| 1213 | /* Creates a string from a stream ID. The returned string must be released with |
| 1214 | * RedisModule_FreeString(), unless automatic memory is enabled. |
no test coverage detected