Skip to content

Commit 3eacedf

Browse files
committed
Include string utils from backends
1 parent 9e2b311 commit 3eacedf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ file (GLOB BACKEND_COMMON_SRC
1616
err.c
1717
util/dict.c
1818
tensor.c
19+
util/string_utils.c
1920
serialization/ai_datatypes.c)
2021

2122
ADD_LIBRARY(redisai_obj OBJECT

src/tensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ RAI_Tensor *_TensorCreateWithDLDataTypeAndRString(DLDataType dtype, size_t dtype
193193
}
194194
char *data = RedisModule_Alloc(nbytes);
195195
memcpy(data, blob, nbytes);
196-
RedisModule_RetainString(NULL, rstr);
196+
RAI_HoldString(NULL, rstr);
197197

198198
RAI_Tensor *ret = RedisModule_Alloc(sizeof(*ret));
199199
ret->tensor = (DLManagedTensor){.dl_tensor = (DLTensor){.ctx = ctx,

0 commit comments

Comments
 (0)