[Python-checkins] r46432 - in python/trunk: Doc/api/concrete.tex Lib/test/test_unicodedata.py Misc/NEWS Modules/unicodedata.c Objects/unicodectype.c Objects/unicodeobject.c

A.M. Kuchling amk at amk.ca
Sat May 27 12:47:29 CEST 2006


On Sat, May 27, 2006 at 10:36:54AM +0200, martin.v.loewis wrote:
> --- python/trunk/Objects/unicodeobject.c	(original)
> +++ python/trunk/Objects/unicodeobject.c	Sat May 27 10:36:52 2006
> @@ -2376,6 +2376,7 @@
> 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. */

Was this a debugging change that slipped in, or is something going on
here (perhaps to fix an alignment-related issue)? If the character is
copied by the assignment, is the memcpy() just below it necessary?
--amk


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /