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
28716985
Commit
28716985
authored
Oct 11, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
/* Remove unused code. It has been committed out since 2000 (!). */
parent
53bb548f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
54 deletions
+0
-54
Objects/unicodeobject.c
Objects/unicodeobject.c
+0
-54
No files found.
Objects/unicodeobject.c
View file @
28716985
...
...
@@ -10043,58 +10043,6 @@ unicode_center(PyObject *self, PyObject *args)
return
pad
(
self
,
left
,
marg
-
left
,
fillchar
);
}
#if 0
/* This code should go into some future Unicode collation support
module. The basic comparison should compare ordinals on a naive
basis (this is what Java does and thus Jython too). */
/* speedy UTF-16 code point order comparison */
/* gleaned from: */
/* http://www-4.ibm.com/software/developer/library/utf16.html?dwzone=unicode */
static short utf16Fixup[32] =
{
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0x2000, -0x800, -0x800, -0x800, -0x800
};
static int
unicode_compare(PyUnicodeObject *str1, PyUnicodeObject *str2)
{
Py_ssize_t len1, len2;
Py_UNICODE *s1 = str1->str;
Py_UNICODE *s2 = str2->str;
len1 = str1->_base._base.length;
len2 = str2->_base._base.length;
while (len1 > 0 && len2 > 0) {
Py_UNICODE c1, c2;
c1 = *s1++;
c2 = *s2++;
if (c1 > (1<<11) * 26)
c1 += utf16Fixup[c1>>11];
if (c2 > (1<<11) * 26)
c2 += utf16Fixup[c2>>11];
/* now c1 and c2 are in UTF-32-compatible order */
if (c1 != c2)
return (c1 < c2) ? -1 : 1;
len1--; len2--;
}
return (len1 < len2) ? -1 : (len1 != len2);
}
#else
/* This function assumes that str1 and str2 are readied by the caller. */
static
int
...
...
@@ -10123,8 +10071,6 @@ unicode_compare(PyUnicodeObject *str1, PyUnicodeObject *str2)
return
(
len1
<
len2
)
?
-
1
:
(
len1
!=
len2
);
}
#endif
int
PyUnicode_Compare
(
PyObject
*
left
,
PyObject
*
right
)
{
...
...
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