dev-python/hiredis: Revision bump for new dev-libs/hiredis API
authorSven Wegener <swegener@gentoo.org>
Wed, 1 Apr 2020 11:30:58 +0000 (13:30 +0200)
committerSven Wegener <swegener@gentoo.org>
Wed, 1 Apr 2020 11:37:20 +0000 (13:37 +0200)
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Sven Wegener <swegener@gentoo.org>
dev-python/hiredis/files/hiredis-0.2.0-api-0.14.patch [new file with mode: 0644]
dev-python/hiredis/hiredis-0.2.0-r3.ebuild [moved from dev-python/hiredis/hiredis-0.2.0-r2.ebuild with 76% similarity]

diff --git a/dev-python/hiredis/files/hiredis-0.2.0-api-0.14.patch b/dev-python/hiredis/files/hiredis-0.2.0-api-0.14.patch
new file mode 100644 (file)
index 0000000..c957ad7
--- /dev/null
@@ -0,0 +1,32 @@
+diff -Nur hiredis-0.2.0.orig/src/reader.c hiredis-0.2.0/src/reader.c
+--- hiredis-0.2.0.orig/src/reader.c    2015-04-02 23:49:10.000000000 +0200
++++ hiredis-0.2.0/src/reader.c 2020-04-01 13:26:50.504058251 +0200
+@@ -157,7 +157,7 @@
+ };
+ static void Reader_dealloc(hiredis_ReaderObject *self) {
+-    redisReplyReaderFree(self->reader);
++    redisReaderFree(self->reader);
+     if (self->encoding)
+         free(self->encoding);
+     Py_XDECREF(self->protocolErrorClass);
+@@ -267,7 +267,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;
+@@ -281,8 +281,8 @@
+     PyObject *err;
+     char *errstr;
+-    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));
+         obj = PyObject_Type(err);
similarity index 76%
rename from dev-python/hiredis/hiredis-0.2.0-r2.ebuild
rename to dev-python/hiredis/hiredis-0.2.0-r3.ebuild
index e5ca7fa47cfdf2bd00c7ee5e9371e927fb916a36..c6aca79094e86b3e823aceb455f6927f135ec8fc 100644 (file)
@@ -15,7 +15,10 @@ SLOT="0"
 KEYWORDS="~amd64 ~arm ~x86"
 IUSE=""
 
-DEPEND=">=dev-libs/hiredis-0.13.1:="
+DEPEND=">=dev-libs/hiredis-0.14:="
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}"/${P}-r1-system-libs.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-r1-system-libs.patch
+       "${FILESDIR}"/${P}-api-0.14.patch
+)