From: Fredrik Lundh Date: Tue, 26 Jun 2001 20:36:12 +0000 (+0000) Subject: more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) > X-Git-Tag: v2.2a3~1410 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee13dba1aa7bc54b6b78eaed508a0f9c972204df;p=thirdparty%2FPython%2Fcpython.git more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) > sizeof(int) --- diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c index 7ee6a6c01538..3bc19b2d447f 100644 --- a/Objects/unicodectype.c +++ b/Objects/unicodectype.c @@ -32,16 +32,17 @@ typedef struct { #include "unicodetype_db.h" static const _PyUnicode_TypeRecord * -gettyperecord(int code) +gettyperecord(Py_UNICODE code) { int index; - if (code < 0 || code >= 65536) + if (code >= 65536) index = 0; else { index = index1[(code>>SHIFT)]; index = index2[(index<