aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-hiredis/hiredis-0.14-compat.patch
diff options
context:
space:
mode:
authorEivind Uggedal <eu@eju.no>2019-05-12 19:01:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-08-21 14:04:42 +0000
commit06b2c874a9dc365e2190c60bb93ea7a6f27fc72c (patch)
treeefcd3729521313a6ff9e44fc2f807f986d0145b2 /main/py3-hiredis/hiredis-0.14-compat.patch
parentde4dad0b9450b25c3a13f7eeff38c914b2721ead (diff)
downloadaports-06b2c874a9dc365e2190c60bb93ea7a6f27fc72c.tar.bz2
aports-06b2c874a9dc365e2190c60bb93ea7a6f27fc72c.tar.xz
main/py3-hiredis: update to 1.0.0, py3 only, adopt
* Drop py2 version * Adopt package (again) * Modernize * Add python3 support * Run tests * Patch to work with system hiredis 0.14
Diffstat (limited to 'main/py3-hiredis/hiredis-0.14-compat.patch')
-rw-r--r--main/py3-hiredis/hiredis-0.14-compat.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/py3-hiredis/hiredis-0.14-compat.patch b/main/py3-hiredis/hiredis-0.14-compat.patch
new file mode 100644
index 0000000000..86e0d3f585
--- /dev/null
+++ b/main/py3-hiredis/hiredis-0.14-compat.patch
@@ -0,0 +1,31 @@
+--- hiredis-1.0.0/src/reader.c
++++ hiredis-1.0.0_p/src/reader.c
+@@ -167,7 +167,7 @@
+ static void Reader_dealloc(hiredis_ReaderObject *self) {
+ // we don't need to free self->encoding as the buffer is managed by Python
+ // https://docs.python.org/3/c-api/arg.html#strings-and-buffers
+- redisReplyReaderFree(self->reader);
++ redisReaderFree(self->reader);
+ Py_XDECREF(self->protocolErrorClass);
+ Py_XDECREF(self->replyErrorClass);
+
+@@ -272,7 +272,7 @@
+ goto error;
+ }
+
+- redisReplyReaderFeed(self->reader, (char *)buf.buf + off, len);
++ redisReaderFeed(self->reader, (char *)buf.buf + off, len);
+ PyBuffer_Release(&buf);
+ Py_RETURN_NONE;
+
+@@ -291,8 +291,8 @@
+ return NULL;
+ }
+
+- if (redisReplyReaderGetReply(self->reader, (void**)&obj) == REDIS_ERR) {
+- errstr = redisReplyReaderGetError(self->reader);
++ if (redisReaderGetReply(self->reader, (void**)&obj) == REDIS_ERR) {
++ errstr = redisReaderGetError(self->reader);
+ /* protocolErrorClass might be a callable. call it, then use it's type */
+ err = createError(self->protocolErrorClass, errstr, strlen(errstr));
+ if (err != NULL) {