summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodectype.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c
index 7ee6a6c..3bc19b2 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<<SHIFT)+(code&((1<<SHIFT)-1))];
}
+
return &_PyUnicode_TypeRecords[index];
}