pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/ee13dba1aa7bc54b6b78eaed508a0f9c972204df

aa60c69660fa.css" /> more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) > · python/cpython@ee13dba · GitHub
Skip to content

Commit ee13dba

Browse files
author
Fredrik Lundh
committed
more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) >
sizeof(int)
1 parent e9218a1 commit ee13dba

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Objects/unicodectype.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ typedef struct {
3232
#include "unicodetype_db.h"
3333

3434
static const _PyUnicode_TypeRecord *
35-
gettyperecord(int code)
35+
gettyperecord(Py_UNICODE code)
3636
{
3737
int index;
3838

39-
if (code < 0 || code >= 65536)
39+
if (code >= 65536)
4040
index = 0;
4141
else {
4242
index = index1[(code>>SHIFT)];
4343
index = index2[(index<<SHIFT)+(code&((1<<SHIFT)-1))];
4444
}
45+
4546
return &_PyUnicode_TypeRecords[index];
4647
}
4748

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy