From ee13dba1aa7bc54b6b78eaed508a0f9c972204df Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Tue, 26 Jun 2001 20:36:12 +0000 Subject: [PATCH] more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) > sizeof(int) --- Objects/unicodectype.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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<