[Python-checkins] CVS: python/dist/src/Objects unicodectype.c,2.7,2.8

Fredrik Lundh effbot@users.sourceforge.net
Tue, 26 Jun 2001 13:36:15 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv7096/Objects

Modified Files:
	unicodectype.c 
Log Message:


more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) >
sizeof(int)


Index: unicodectype.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodectype.c,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -r2.7 -r2.8
*** unicodectype.c	2000/09/25 21:48:13	2.7
--- unicodectype.c	2001/06/26 20:36:12	2.8
***************
*** 33,41 ****
  
  static const _PyUnicode_TypeRecord *
! gettyperecord(int code)
  {
      int index;
  
!     if (code < 0 || code >= 65536)
          index = 0;
      else {
--- 33,41 ----
  
  static const _PyUnicode_TypeRecord *
! gettyperecord(Py_UNICODE code)
  {
      int index;
  
!     if (code >= 65536)
          index = 0;
      else {
***************
*** 43,46 ****
--- 43,47 ----
          index = index2[(index<<SHIFT)+(code&((1<<SHIFT)-1))];
      }
+ 
      return &_PyUnicode_TypeRecords[index];
  }