Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
12fd89d5
Commit
12fd89d5
authored
Apr 13, 2006
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert 34153: Py_UNICODE should not be signed.
parent
2bf45ee5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
Objects/unicodeobject.c
Objects/unicodeobject.c
+3
-8
No files found.
Objects/unicodeobject.c
View file @
12fd89d5
...
...
@@ -135,14 +135,9 @@ int unicode_resize(register PyUnicodeObject *unicode,
/* Resizing shared object (unicode_empty or single character
objects) in-place is not allowed. Use PyUnicode_Resize()
instead ! */
if
(
unicode
==
unicode_empty
||
(
unicode
->
length
==
1
&&
/* MvL said unicode->str[] may be signed. Python generally assumes
* an int contains at least 32 bits, and we don't use more than
* 32 bits even in a UCS4 build, so casting to unsigned int should
* be correct.
*/
(
unsigned
int
)
unicode
->
str
[
0
]
<
256U
&&
if
(
unicode
==
unicode_empty
||
(
unicode
->
length
==
1
&&
unicode
->
str
[
0
]
<
256U
&&
unicode_latin1
[
unicode
->
str
[
0
]]
==
unicode
))
{
PyErr_SetString
(
PyExc_SystemError
,
"can't resize shared unicode objects"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment