Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efec115

Browse files
committed
Prototypes added for MBCS codecs. (Win32 only.)
1 parent 50fbb15 commit efec115

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Include/unicodeobject.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,26 @@ extern DL_IMPORT(PyObject *) PyUnicode_TranslateCharmap(
561561
const char *errors /* error handling */
562562
);
563563

564+
#ifdef MS_WIN32
565+
/* --- MBCS codecs for Windows -------------------------------------------- */
566+
extern DL_IMPORT(PyObject*) PyUnicode_DecodeMBCS(
567+
const char *string, /* MBCS encoded string */
568+
int length, /* size of string */
569+
const char *errors /* error handling */
570+
);
571+
572+
extern DL_IMPORT(PyObject*) PyUnicode_AsMBCSString(
573+
PyObject *unicode /* Unicode object */
574+
);
575+
576+
extern DL_IMPORT(PyObject*) PyUnicode_EncodeMBCS(
577+
const Py_UNICODE *data, /* Unicode char buffer */
578+
int length, /* Number of Py_UNICODE chars to encode */
579+
const char *errors /* error handling */
580+
);
581+
582+
583+
#endif /* MS_WIN32 */
564584
/* --- Methods & Slots ----------------------------------------------------
565585
566586
These are capable of handling Unicode objects and strings on input

0 commit comments

Comments
 (0)