]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport: Patch #1488312, Fix memory alignment problem on SPARC in unicode.
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 15 May 2006 07:22:23 +0000 (07:22 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 15 May 2006 07:22:23 +0000 (07:22 +0000)
Misc/ACKS
Misc/NEWS
Objects/unicodeobject.c

index 479d4094e65cb69d04c53dfc021f85a700c18920..e1ebb9a891f6f5368edf3c5475c139fc24c735ce 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -440,6 +440,7 @@ Denis S. Otkidach
 Russel Owen
 Mike Pall
 Todd R. Palmer
+Jan Palus
 Alexandre Parenteau
 Dan Parisien
 Harri Pasanen
index 5adfc11787415a5041b80e5a970edcc6d0685a85..7df1bb0e33c541d0541cf0d22028afacd758884a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.4.4c1?
 Core and builtins
 -----------------
 
+- Patch #1488312, Fix memory alignment problem on SPARC in unicode
+
 Extension Modules
 -----------------
 
index fc503c7badd56fe5e192a98d17e68dc95f68a924..5fce3f91c729233db5ed46ebee755867ed5ab1ee 100644 (file)
@@ -2302,7 +2302,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 (