Commit a70070c9 authored by Georg Brandl's avatar Georg Brandl

Merged revisions 83395,83417 via svnmerge from

svn+ssh://svn.python.org/python/branches/py3k

........
  r83395 | georg.brandl | 2010-08-01 10:49:18 +0200 (So, 01 Aug 2010) | 1 line

  #8821: do not rely on Unicode strings being terminated with a \u0000, rather explicitly check range before looking for a second surrogate character.
........
  r83417 | georg.brandl | 2010-08-01 20:38:26 +0200 (So, 01 Aug 2010) | 1 line

  #5776: fix mistakes in python specfile.  (Nobody probably uses it anyway.)
........
parent cea7e559
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
%define name python %define name python
#--start constants-- #--start constants--
%define version 3.1.2 %define version 3.1.2
%define libver 3.1 %define libvers 3.1
#--end constants-- #--end constants--
%define release 1pydotorg %define release 1pydotorg
%define __prefix /usr %define __prefix /usr
...@@ -54,7 +54,7 @@ Summary: An interpreted, interactive, object-oriented programming language. ...@@ -54,7 +54,7 @@ Summary: An interpreted, interactive, object-oriented programming language.
Name: %{name}%{binsuffix} Name: %{name}%{binsuffix}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
Copyright: Modified CNRI Open Source License License: PSF
Group: Development/Languages Group: Development/Languages
Source: Python-%{version}.tar.bz2 Source: Python-%{version}.tar.bz2
%if %{include_docs} %if %{include_docs}
...@@ -256,7 +256,7 @@ if [ ! -z "%{binsuffix}" ] ...@@ -256,7 +256,7 @@ if [ ! -z "%{binsuffix}" ]
then then
( cd $RPM_BUILD_ROOT%{__prefix}/bin; rm -f python[0-9a-zA-Z]*; ( cd $RPM_BUILD_ROOT%{__prefix}/bin; rm -f python[0-9a-zA-Z]*;
mv -f python python"%{binsuffix}" ) mv -f python python"%{binsuffix}" )
( cd $RPM_BUILD_ROOT%{__prefix}/man/man1; mv python.1 python%{binsuffix}.1 ) ( cd $RPM_BUILD_ROOT%{__prefix}/share/man/man1; mv python.1 python%{binsuffix}.1 )
( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f pydoc pydoc"%{binsuffix}" ) ( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f pydoc pydoc"%{binsuffix}" )
( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f idle idle"%{binsuffix}" ) ( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f idle idle"%{binsuffix}" )
fi fi
...@@ -341,14 +341,13 @@ rm -f mainpkg.files tools.files ...@@ -341,14 +341,13 @@ rm -f mainpkg.files tools.files
%defattr(-,root,root) %defattr(-,root,root)
%doc Misc/README Misc/cheatsheet Misc/Porting %doc Misc/README Misc/cheatsheet Misc/Porting
%doc LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS %doc LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS
%{__prefix}/man/man1/python%{binsuffix}.1* %{__prefix}/share/man/man1/python%{binsuffix}.1*
%attr(755,root,root) %dir %{__prefix}/include/python%{libvers} %attr(755,root,root) %dir %{__prefix}/include/python%{libvers}
%attr(755,root,root) %dir %{__prefix}/%{libdirname}/python%{libvers}/ %attr(755,root,root) %dir %{__prefix}/%{libdirname}/python%{libvers}/
%{__prefix}/%{libdirname}/python%{libvers}/*.txt %{__prefix}/%{libdirname}/python%{libvers}/*.txt
%{__prefix}/%{libdirname}/python%{libvers}/*.py* %{__prefix}/%{libdirname}/python%{libvers}/*.py*
%{__prefix}/%{libdirname}/python%{libvers}/pdb.doc %{__prefix}/%{libdirname}/python%{libvers}/pdb.doc
%{__prefix}/%{libdirname}/python%{libvers}/profile.doc
%{__prefix}/%{libdirname}/python%{libvers}/curses %{__prefix}/%{libdirname}/python%{libvers}/curses
%{__prefix}/%{libdirname}/python%{libvers}/distutils %{__prefix}/%{libdirname}/python%{libvers}/distutils
%{__prefix}/%{libdirname}/python%{libvers}/encodings %{__prefix}/%{libdirname}/python%{libvers}/encodings
......
...@@ -3597,7 +3597,7 @@ PyObject *PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s, ...@@ -3597,7 +3597,7 @@ PyObject *PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s,
ch2 = *s++; ch2 = *s++;
size--; size--;
if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) { if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000; ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
*p++ = '\\'; *p++ = '\\';
*p++ = 'U'; *p++ = 'U';
...@@ -3839,7 +3839,7 @@ PyObject *PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s, ...@@ -3839,7 +3839,7 @@ PyObject *PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s,
ch2 = *s++; ch2 = *s++;
size--; size--;
if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) { if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000; ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
*p++ = '\\'; *p++ = '\\';
*p++ = 'U'; *p++ = 'U';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment