Skip to content

Commit f4dd081

Browse files
authored
pack: Replace sdsalloc.h with alloc.h (#159)
Fixes #158. * src/pack.c: Replace sdsalloc.h with alloc.h. (pack_command): Replace s_malloc with hi_malloc.
1 parent e70af5b commit f4dd081

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pack.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern sds sdscpylen(sds s, const char *t, size_t len);
1616
extern sds sdsnewlen(const void *init, size_t initlen);
1717
#endif
1818

19-
#include <hiredis/sdsalloc.h>
19+
#include <hiredis/alloc.h>
2020

2121
PyObject *
2222
pack_command(PyObject *cmd)
@@ -32,7 +32,7 @@ pack_command(PyObject *cmd)
3232
}
3333

3434
Py_ssize_t tokens_number = PyTuple_Size(cmd);
35-
sds *tokens = s_malloc(sizeof(sds) * tokens_number);
35+
sds *tokens = hi_malloc(sizeof(sds) * tokens_number);
3636
if (tokens == NULL)
3737
{
3838
return PyErr_NoMemory();
@@ -118,4 +118,4 @@ pack_command(PyObject *cmd)
118118
sdsfreesplitres(tokens, tokens_number);
119119
hi_free(lengths);
120120
return result;
121-
}
121+
}

0 commit comments

Comments
 (0)