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

Skip to content

Commit 9b14ab3

Browse files
author
Fredrik Lundh
committed
Make Unicode work a bit better on Windows...
1 parent ac93bc2 commit 9b14ab3

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Include/unicodeobject.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ Copyright (c) Corporation for National Research Initiatives.
5858

5959
/* --- Internal Unicode Format -------------------------------------------- */
6060

61+
/* FIXME: MvL's new implementation assumes that Py_UNICODE_SIZE is
62+
properly set, but the default rules below doesn't set it. I'll
63+
sort this out some other day -- [email protected] */
64+
65+
#ifndef Py_UNICODE_SIZE
66+
#error Must define Py_UNICODE_SIZE
67+
#endif
68+
6169
/* experimental UCS-4 support. enable at your own risk! */
6270
#undef USE_UCS4_STORAGE
6371
#if Py_UNICODE_SIZE == 4

PC/config.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,15 @@ typedef unsigned long uintptr_t;
484484
/* Define if you want to use the GNU readline library */
485485
/* #define WITH_READLINE 1 */
486486

487+
/* Define if you want to have a Unicode type. */
488+
#define Py_USING_UNICODE
489+
490+
/* Define as the integral type used for Unicode representation. */
491+
#define PY_UNICODE_TYPE unsigned short
492+
493+
/* Define as the size of the unicode type. */
494+
#define Py_UNICODE_SIZE SIZEOF_SHORT
495+
487496
/* Define if you want cycle garbage collection */
488497
#define WITH_CYCLE_GC 1
489498

0 commit comments

Comments
 (0)