summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-hiredis-fix-header.patch
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-18 22:07:42 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-20 08:32:32 -0400
commit20fa738123d005bb543a09974c5c981917d10264 (patch)
treed80908f112c94b80c26cd54aef3681900743cdd6 /gnu/packages/patches/python-hiredis-fix-header.patch
parent9956638943df3b9902055dd80df98035c014c56c (diff)
gnu: python-hiredis: Update to 2.2.2 and enable tests.
* gnu/packages/databases.scm (python-hiredis): Update to 2.2.2. [source]: Fetch via git and apply patches. [build-system]: Use pyproject-build-system. [arguments]: Enable tests. Add #:phases. [native-inputs]: New field. [inputs]: Likewise. * gnu/packages/patches/python-hiredis-fix-header.patch: New file. * gnu/packages/patches/python-hiredis-use-system-hiredis.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them.
Diffstat (limited to 'gnu/packages/patches/python-hiredis-fix-header.patch')
-rw-r--r--gnu/packages/patches/python-hiredis-fix-header.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-hiredis-fix-header.patch b/gnu/packages/patches/python-hiredis-fix-header.patch
new file mode 100644
index 0000000000..168b76920d
--- /dev/null
+++ b/gnu/packages/patches/python-hiredis-fix-header.patch
@@ -0,0 +1,49 @@
+Upstream status: https://github.com/redis/hiredis-py/pull/159
+
+From c2a20695aae53de7b5160e29675344df0b805fa6 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Sat, 18 Mar 2023 15:18:08 -0400
+Subject: [PATCH] pack: Replace sdsalloc.h with alloc.h
+
+Fixes #158.
+
+* src/pack.c: Replace sdsalloc.h with alloc.h.
+(pack_command): Replace s_malloc with hi_malloc.
+---
+ src/pack.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/pack.c b/src/pack.c
+index 443e9d3..23e4004 100644
+--- a/src/pack.c
++++ b/src/pack.c
+@@ -16,7 +16,7 @@ extern sds sdscpylen(sds s, const char *t, size_t len);
+ extern sds sdsnewlen(const void *init, size_t initlen);
+ #endif
+
+-#include <hiredis/sdsalloc.h>
++#include <hiredis/alloc.h>
+
+ PyObject *
+ pack_command(PyObject *cmd)
+@@ -32,7 +32,7 @@ pack_command(PyObject *cmd)
+ }
+
+ Py_ssize_t tokens_number = PyTuple_Size(cmd);
+- sds *tokens = s_malloc(sizeof(sds) * tokens_number);
++ sds *tokens = hi_malloc(sizeof(sds) * tokens_number);
+ if (tokens == NULL)
+ {
+ return PyErr_NoMemory();
+@@ -118,4 +118,4 @@ cleanup:
+ sdsfreesplitres(tokens, tokens_number);
+ hi_free(lengths);
+ return result;
+-}
+\ No newline at end of file
++}
+
+base-commit: 8adb1b3cb38b82cdc73fa2d72879712da1f74e70
+--
+2.39.1
+