[Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.38,1.39
Martin v. L?wis
loewis@users.sourceforge.net
Thu, 19 Jul 2001 07:26:13 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv9954
Modified Files:
sre_compile.py
Log Message:
Patch #442512: put block indices in the right byte order on bigendian systems.
Index: sre_compile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** sre_compile.py 2001/07/02 16:58:38 1.38
--- sre_compile.py 2001/07/19 14:26:10 1.39
***************
*** 9,13 ****
#
! import _sre
from sre_constants import *
--- 9,13 ----
#
! import _sre,sys
from sre_constants import *
***************
*** 282,286 ****
assert MAXCODE == 65535
for i in range(128):
! header.append(mapping[2*i]+256*mapping[2*i+1])
data[0:0] = header
return [(BIGCHARSET, data)]
--- 282,289 ----
assert MAXCODE == 65535
for i in range(128):
! if sys.byteorder == 'big':
! header.append(256*mapping[2*i]+mapping[2*i+1])
! else:
! header.append(mapping[2*i]+256*mapping[2*i+1])
data[0:0] = header
return [(BIGCHARSET, data)]