1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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) {
|