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
e7319cb0
Commit
e7319cb0
authored
Nov 04, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #16286: remove duplicated identity check from unicode_compare()
Move the test to PyUnicode_Compare()
parent
d2b2471b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Objects/unicodeobject.c
Objects/unicodeobject.c
+5
-4
No files found.
Objects/unicodeobject.c
View file @
e7319cb0
...
...
@@ -10428,10 +10428,6 @@ unicode_compare(PyObject *str1, PyObject *str2)
void
*
data1
,
*
data2
;
Py_ssize_t
len1
,
len2
,
len
;
/* a string is equal to itself */
if
(
str1
==
str2
)
return
0
;
kind1
=
PyUnicode_KIND
(
str1
);
kind2
=
PyUnicode_KIND
(
str2
);
data1
=
PyUnicode_DATA
(
str1
);
...
...
@@ -10555,6 +10551,11 @@ PyUnicode_Compare(PyObject *left, PyObject *right)
if
(
PyUnicode_READY
(
left
)
==
-
1
||
PyUnicode_READY
(
right
)
==
-
1
)
return
-
1
;
/* a string is equal to itself */
if
(
left
==
right
)
return
0
;
return
unicode_compare
(
left
,
right
);
}
PyErr_Format
(
PyExc_TypeError
,
...
...
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