Back to index

python3.2  3.2.2
Classes | Defines | Typedefs
multibytecodec.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  MultibyteCodec_State
struct  MultibyteCodec
struct  MultibyteCodecObject
struct  MultibyteStatefulCodecContext
struct  MultibyteStatefulEncoderContext
struct  MultibyteStatefulDecoderContext
struct  MultibyteIncrementalEncoderObject
struct  MultibyteIncrementalDecoderObject
struct  MultibyteStreamReaderObject
struct  MultibyteStreamWriterObject

Defines

#define MultibyteCodec_Check(op)   ((op)->ob_type == &MultibyteCodec_Type)
#define _MultibyteStatefulCodec_HEAD
#define MAXENCPENDING   2
#define _MultibyteStatefulEncoder_HEAD
#define MAXDECPENDING   8
#define _MultibyteStatefulDecoder_HEAD
#define MBERR_TOOSMALL   (-1) /* insufficient output buffer space */
#define MBERR_TOOFEW   (-2) /* incomplete input buffer */
#define MBERR_INTERNAL   (-3) /* internal runtime error */
#define ERROR_STRICT   (PyObject *)(1)
#define ERROR_IGNORE   (PyObject *)(2)
#define ERROR_REPLACE   (PyObject *)(3)
#define ERROR_ISCUSTOM(p)   ((p) < ERROR_STRICT || ERROR_REPLACE < (p))
#define ERROR_DECREF(p)
#define MBENC_FLUSH   0x0001 /* encode all characters encodable */
#define MBENC_MAX   MBENC_FLUSH
#define PyMultibyteCodec_CAPSULE_NAME   "multibytecodec.__map_*"

Typedefs

typedef unsigned int ucs4_t
typedef unsigned short ucs2_t
typedef unsigned short DBCHAR
typedef int(* mbcodec_init )(const void *config)
typedef Py_ssize_t(* mbencode_func )(MultibyteCodec_State *state, const void *config, const Py_UNICODE **inbuf, Py_ssize_t inleft, unsigned char **outbuf, Py_ssize_t outleft, int flags)
typedef int(* mbencodeinit_func )(MultibyteCodec_State *state, const void *config)
typedef Py_ssize_t(* mbencodereset_func )(MultibyteCodec_State *state, const void *config, unsigned char **outbuf, Py_ssize_t outleft)
typedef Py_ssize_t(* mbdecode_func )(MultibyteCodec_State *state, const void *config, const unsigned char **inbuf, Py_ssize_t inleft, Py_UNICODE **outbuf, Py_ssize_t outleft)
typedef int(* mbdecodeinit_func )(MultibyteCodec_State *state, const void *config)
typedef Py_ssize_t(* mbdecodereset_func )(MultibyteCodec_State *state, const void *config)

Class Documentation

union MultibyteCodec_State

Definition at line 25 of file multibytecodec.h.

Class Members
unsigned char c
int i
void * p
ucs2_t u2
ucs4_t u4
struct MultibyteCodec

Definition at line 53 of file multibytecodec.h.

Collaboration diagram for MultibyteCodec:
Class Members
mbcodec_init codecinit
const void * config
mbdecodeinit_func decinit
mbdecode_func decode
mbdecodereset_func decreset
mbencodeinit_func encinit
mbencode_func encode
const char * encoding
mbencodereset_func encreset
struct MultibyteCodecObject

Definition at line 65 of file multibytecodec.h.

Collaboration diagram for MultibyteCodecObject:
Class Members
PyObject_HEAD MultibyteCodec * codec
struct MultibyteStatefulCodecContext

Definition at line 77 of file multibytecodec.h.

struct MultibyteStatefulEncoderContext

Definition at line 86 of file multibytecodec.h.

struct MultibyteStatefulDecoderContext

Definition at line 95 of file multibytecodec.h.

struct MultibyteIncrementalEncoderObject

Definition at line 99 of file multibytecodec.h.

struct MultibyteIncrementalDecoderObject

Definition at line 103 of file multibytecodec.h.

struct MultibyteStreamReaderObject

Definition at line 107 of file multibytecodec.h.

Collaboration diagram for MultibyteStreamReaderObject:
Class Members
_MultibyteStatefulDecoder_HEAD
PyObject *
stream
struct MultibyteStreamWriterObject

Definition at line 112 of file multibytecodec.h.

Collaboration diagram for MultibyteStreamWriterObject:
Class Members
_MultibyteStatefulEncoder_HEAD
PyObject *
stream

Define Documentation

Value:
PyObject_HEAD                               \
    MultibyteCodec *codec;                      \
    MultibyteCodec_State state;                 \
    PyObject *errors;

Definition at line 72 of file multibytecodec.h.

Value:
_MultibyteStatefulCodec_HEAD                \
    unsigned char pending[MAXDECPENDING];       \
    Py_ssize_t pendingsize;

Definition at line 91 of file multibytecodec.h.

Value:
_MultibyteStatefulCodec_HEAD                \
    Py_UNICODE pending[MAXENCPENDING];          \
    Py_ssize_t pendingsize;

Definition at line 82 of file multibytecodec.h.

#define ERROR_DECREF (   p)
Value:
do {                    \
    if (p != NULL && ERROR_ISCUSTOM(p)) {       \
        Py_DECREF(p);                           \
    }                                           \
} while (0);

Definition at line 126 of file multibytecodec.h.

#define ERROR_IGNORE   (PyObject *)(2)

Definition at line 123 of file multibytecodec.h.

#define ERROR_ISCUSTOM (   p)    ((p) < ERROR_STRICT || ERROR_REPLACE < (p))

Definition at line 125 of file multibytecodec.h.

#define ERROR_REPLACE   (PyObject *)(3)

Definition at line 124 of file multibytecodec.h.

#define ERROR_STRICT   (PyObject *)(1)

Definition at line 122 of file multibytecodec.h.

#define MAXDECPENDING   8

Definition at line 90 of file multibytecodec.h.

#define MAXENCPENDING   2

Definition at line 81 of file multibytecodec.h.

#define MBENC_FLUSH   0x0001 /* encode all characters encodable */

Definition at line 132 of file multibytecodec.h.

#define MBENC_MAX   MBENC_FLUSH

Definition at line 133 of file multibytecodec.h.

#define MBERR_INTERNAL   (-3) /* internal runtime error */

Definition at line 120 of file multibytecodec.h.

#define MBERR_TOOFEW   (-2) /* incomplete input buffer */

Definition at line 119 of file multibytecodec.h.

#define MBERR_TOOSMALL   (-1) /* insufficient output buffer space */

Definition at line 118 of file multibytecodec.h.

#define MultibyteCodec_Check (   op)    ((op)->ob_type == &MultibyteCodec_Type)

Definition at line 70 of file multibytecodec.h.

#define PyMultibyteCodec_CAPSULE_NAME   "multibytecodec.__map_*"

Definition at line 135 of file multibytecodec.h.


Typedef Documentation

typedef unsigned short DBCHAR

Definition at line 22 of file multibytecodec.h.

Definition at line 33 of file multibytecodec.h.

typedef Py_ssize_t(* mbdecode_func)(MultibyteCodec_State *state, const void *config, const unsigned char **inbuf, Py_ssize_t inleft, Py_UNICODE **outbuf, Py_ssize_t outleft)

Definition at line 44 of file multibytecodec.h.

Definition at line 48 of file multibytecodec.h.

Definition at line 50 of file multibytecodec.h.

typedef Py_ssize_t(* mbencode_func)(MultibyteCodec_State *state, const void *config, const Py_UNICODE **inbuf, Py_ssize_t inleft, unsigned char **outbuf, Py_ssize_t outleft, int flags)

Definition at line 34 of file multibytecodec.h.

Definition at line 39 of file multibytecodec.h.

typedef Py_ssize_t(* mbencodereset_func)(MultibyteCodec_State *state, const void *config, unsigned char **outbuf, Py_ssize_t outleft)

Definition at line 41 of file multibytecodec.h.

typedef unsigned short ucs2_t

Definition at line 22 of file multibytecodec.h.

typedef unsigned int ucs4_t

Definition at line 16 of file multibytecodec.h.