File: reader.h

package info (click to toggle)
python-hiredis 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 408 kB
  • sloc: ansic: 4,214; python: 271; makefile: 10
file content (27 lines) | stat: -rw-r--r-- 671 bytes parent folder | download
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
#ifndef __READER_H
#define __READER_H

#include "hiredis.h"

typedef struct {
    PyObject_HEAD
    redisReader *reader;
    char *encoding;
    int shouldDecode;
    PyObject *protocolErrorClass;
    PyObject *replyErrorClass;

    /* Stores error object in between incomplete calls to #gets, in order to
     * only set the error once a full reply has been read. Otherwise, the
     * reader could get in an inconsistent state. */
    struct {
        PyObject *ptype;
        PyObject *pvalue;
        PyObject *ptraceback;
    } error;
} hiredis_ReaderObject;

extern PyTypeObject hiredis_ReaderType;
extern redisReplyObjectFunctions hiredis_ObjectFunctions;

#endif