]> granicus.if.org Git - python/commitdiff
Patch #1488312, Fix memory alignment problem on SPARC in unicode. Will backport
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 15 May 2006 07:17:23 +0000 (07:17 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 15 May 2006 07:17:23 +0000 (07:17 +0000)
Misc/ACKS
Misc/NEWS
Objects/unicodeobject.c

index 248c433fc96782f32958672b12d4afd098d25f17..2606dffa1394b505c0d73e440a752ac6c4eca04f 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -455,6 +455,7 @@ Denis S. Otkidach
 Russel Owen
 Mike Pall
 Todd R. Palmer
+Jan Palus
 Alexandre Parenteau
 Dan Parisien
 Harri Pasanen
index c8d64cdda39c4d684f37ab8868fed62b05d44cb4..d2aefb1e0c7ad87635cd66b13d5af5ebfe6e2ebb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.5 alpha 3?
 Core and builtins
 -----------------
 
+- Patch #1488312, Fix memory alignment problem on SPARC in unicode
+
 - Bug #1487966: Fix SystemError with conditional expression in assignment
 
 - WindowsError now has two error code attributes: errno, which carries
index 292d02b1c22afd26e4cffb6dcff37f3acb0e34aa..a3af7f6a858a7e8c840b70c7a43992d9fe6db86a 100644 (file)
@@ -2313,7 +2313,7 @@ PyObject *_PyUnicode_DecodeUnicodeInternal(const char *s,
     end = s + size;
 
     while (s < end) {
-        *p = *(Py_UNICODE *)s;
+        memcpy(p, s, sizeof(Py_UNICODE));
         /* We have to sanity check the raw data, otherwise doom looms for
            some malformed UCS-4 data. */
         if (