Skip to content

Commit 3094484

Browse files
committed
Python Codec Registry and support functions, by Marc-Andre Lemburg.
1 parent ef2255b commit 3094484

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Include/codecs.h

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#ifndef Py_CODECREGISTRY_H
2+
#define Py_CODECREGISTRY_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
7+
/* ------------------------------------------------------------------------
8+
9+
Python Codec Registry and support functions
10+
11+
12+
Written by Marc-Andre Lemburg (mal@lemburg.com).
13+
14+
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
15+
16+
------------------------------------------------------------------------ */
17+
18+
extern DL_IMPORT(int) PyCodec_Register(
19+
PyObject *search_function
20+
);
21+
22+
extern DL_IMPORT(PyObject *) _PyCodec_Lookup(
23+
const char *encoding
24+
);
25+
26+
extern DL_IMPORT(PyObject *) PyCodec_Encoder(
27+
const char *encoding
28+
);
29+
30+
extern DL_IMPORT(PyObject *) PyCodec_Decoder(
31+
const char *encoding
32+
);
33+
34+
extern DL_IMPORT(PyObject *) PyCodec_StreamReader(
35+
const char *encoding,
36+
PyObject *stream,
37+
const char *errors
38+
);
39+
40+
extern DL_IMPORT(PyObject *) PyCodec_Encode(
41+
PyObject *object,
42+
const char *encoding,
43+
const char *errors
44+
);
45+
46+
extern DL_IMPORT(PyObject *) PyCodec_Decode(
47+
PyObject *object,
48+
const char *encoding,
49+
const char *errors
50+
);
51+
52+
#ifdef __cplusplus
53+
}
54+
#endif
55+
#endif /* !Py_CODECREGISTRY_H */

0 commit comments

Comments
 (0)