mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
When creating a unicode object from a char * characters
are always < 256 => remove the test.
This commit is contained in:
parent
db290f0162
commit
071b9da146
1 changed files with 2 additions and 3 deletions
|
@ -408,9 +408,8 @@ PyObject *PyUnicode_FromString(const char *u)
|
|||
return (PyObject *)unicode_empty;
|
||||
}
|
||||
|
||||
/* Single character Unicode objects in the Latin-1 range are
|
||||
shared when using this constructor */
|
||||
if (size == 1 && *u < 256) {
|
||||
/* Single characters are shared when using this constructor */
|
||||
if (size == 1) {
|
||||
unicode = unicode_latin1[*u];
|
||||
if (!unicode) {
|
||||
unicode = _PyUnicode_New(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue