mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
Python Codec Registry and support functions, by Marc-Andre Lemburg.
This commit is contained in:
parent
ef2255b1dd
commit
3094484106
1 changed files with 55 additions and 0 deletions
55
Include/codecs.h
Normal file
55
Include/codecs.h
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
#ifndef Py_CODECREGISTRY_H
|
||||||
|
#define Py_CODECREGISTRY_H
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Python Codec Registry and support functions
|
||||||
|
|
||||||
|
|
||||||
|
Written by Marc-Andre Lemburg (mal@lemburg.com).
|
||||||
|
|
||||||
|
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
extern DL_IMPORT(int) PyCodec_Register(
|
||||||
|
PyObject *search_function
|
||||||
|
);
|
||||||
|
|
||||||
|
extern DL_IMPORT(PyObject *) _PyCodec_Lookup(
|
||||||
|
const char *encoding
|
||||||
|
);
|
||||||
|
|
||||||
|
extern DL_IMPORT(PyObject *) PyCodec_Encoder(
|
||||||
|
const char *encoding
|
||||||
|
);
|
||||||
|
|
||||||
|
extern DL_IMPORT(PyObject *) PyCodec_Decoder(
|
||||||
|
const char *encoding
|
||||||
|
);
|
||||||
|
|
||||||
|
extern DL_IMPORT(PyObject *) PyCodec_StreamReader(
|
||||||
|
const char *encoding,
|
||||||
|
PyObject *stream,
|
||||||
|
const char *errors
|
||||||
|
);
|
||||||
|
|
||||||
|
extern DL_IMPORT(PyObject *) PyCodec_Encode(
|
||||||
|
PyObject *object,
|
||||||
|
const char *encoding,
|
||||||
|
const char *errors
|
||||||
|
);
|
||||||
|
|
||||||
|
extern DL_IMPORT(PyObject *) PyCodec_Decode(
|
||||||
|
PyObject *object,
|
||||||
|
const char *encoding,
|
||||||
|
const char *errors
|
||||||
|
);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* !Py_CODECREGISTRY_H */
|
||||||
Loading…
Add table
Add a link
Reference in a new issue