mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
Port encoders from Py_UNICODE API to unicode object API.
This commit is contained in:
parent
df8077ecd3
commit
1db7c13be1
3 changed files with 248 additions and 263 deletions
|
@ -1088,6 +1088,12 @@ PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF7(
|
|||
int base64WhiteSpace, /* Encode whitespace (sp, ht, nl, cr) in base64 */
|
||||
const char *errors /* error handling */
|
||||
);
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF7(
|
||||
PyObject *unicode, /* Unicode object */
|
||||
int base64SetO, /* Encode RFC2152 Set O characters in base64 */
|
||||
int base64WhiteSpace, /* Encode whitespace (sp, ht, nl, cr) in base64 */
|
||||
const char *errors /* error handling */
|
||||
);
|
||||
#endif
|
||||
|
||||
/* --- UTF-8 Codecs ------------------------------------------------------- */
|
||||
|
@ -1195,6 +1201,11 @@ PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF32(
|
|||
const char *errors, /* error handling */
|
||||
int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
|
||||
);
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF32(
|
||||
PyObject *object, /* Unicode object */
|
||||
const char *errors, /* error handling */
|
||||
int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
|
||||
);
|
||||
#endif
|
||||
|
||||
/* --- UTF-16 Codecs ------------------------------------------------------ */
|
||||
|
@ -1275,6 +1286,11 @@ PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF16(
|
|||
const char *errors, /* error handling */
|
||||
int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
|
||||
);
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF16(
|
||||
PyObject* unicode, /* Unicode object */
|
||||
const char *errors, /* error handling */
|
||||
int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
|
||||
);
|
||||
#endif
|
||||
|
||||
/* --- Unicode-Escape Codecs ---------------------------------------------- */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue