]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make Unicode work a bit better on Windows...
authorFredrik Lundh <fredrik@pythonware.com>
Tue, 26 Jun 2001 22:59:49 +0000 (22:59 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Tue, 26 Jun 2001 22:59:49 +0000 (22:59 +0000)
Include/unicodeobject.h
PC/config.h

index 32002e06581e9574f56fda10a49f9b1927bd6d92..87e01af1736fb4940f73f42781fb704cfda27a5e 100644 (file)
@@ -58,6 +58,14 @@ Copyright (c) Corporation for National Research Initiatives.
 
 /* --- Internal Unicode Format -------------------------------------------- */
 
+/* FIXME: MvL's new implementation assumes that Py_UNICODE_SIZE is
+   properly set, but the default rules below doesn't set it.  I'll
+   sort this out some other day -- fredrik@pythonware.com */
+
+#ifndef Py_UNICODE_SIZE
+#error Must define Py_UNICODE_SIZE
+#endif
+
 /* experimental UCS-4 support.  enable at your own risk! */
 #undef USE_UCS4_STORAGE
 #if Py_UNICODE_SIZE == 4
index 3b81a450a4d09b320d3872e3fa215abaa607a42a..341f9bbbc630c1279cb9e99cc5826c3c14c28822 100644 (file)
@@ -484,6 +484,15 @@ typedef unsigned long uintptr_t;
 /* Define if you want to use the GNU readline library */
 /* #define WITH_READLINE 1 */
 
+/* Define if you want to have a Unicode type. */
+#define Py_USING_UNICODE
+
+/* Define as the integral type used for Unicode representation. */
+#define PY_UNICODE_TYPE unsigned short
+
+/* Define as the size of the unicode type. */
+#define Py_UNICODE_SIZE SIZEOF_SHORT
+
 /* Define if you want cycle garbage collection */
 #define WITH_CYCLE_GC 1