[Python-checkins] python/dist/src/Objects unicodeobject.c, 2.204, 2.205

M.-A. Lemburg mal at egenix.com
Fri Dec 19 03:30:27 EST 2003


perky at users.sourceforge.net wrote:
> Update of /cvsroot/python/python/dist/src/Objects
> In directory sc8-pr-cvs1:/tmp/cvs-serv1651/Objects
> 
> Modified Files:
> 	unicodeobject.c 
> Log Message:
> SF #859573: Reduce compiler warnings on gcc 3.2 and above.
>
> Index: unicodeobject.c
> ***************
> *** 2204,2208 ****
>   
>       /* Latin-1 is equivalent to the first 256 ordinals in Unicode. */
> !     if (size == 1 && *(unsigned char*)s < 256) {
>   	Py_UNICODE r = *(unsigned char*)s;
>   	return PyUnicode_FromUnicode(&r, 1);
> --- 2212,2216 ----
>   
>       /* Latin-1 is equivalent to the first 256 ordinals in Unicode. */
> !     if (size == 1) {
>   	Py_UNICODE r = *(unsigned char*)s;
>   	return PyUnicode_FromUnicode(&r, 1);

This "fix" doesn't look right. Please check.

> ***************
> *** 2406,2409 ****
> --- 2414,2421 ----
>   			else if (*p<1000)
>   			    repsize += 2+3+1;
> + #ifndef Py_UNICODE_WIDE
> + 			else
> + 			    repsize += 2+4+1;
> + #else
>   			else if (*p<10000)
>   			    repsize += 2+4+1;
> ***************
> *** 2414,2417 ****
> --- 2426,2430 ----
>   			else
>   			    repsize += 2+7+1;
> + #endif
>   		    }
>   		    requiredsize = respos+repsize+(endp-collend);

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 19 2003)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the Python-checkins mailing list