Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 044d984

Browse files
committed
bpo-18697: Fix issue with variable names being overriden
1 parent 7536bb7 commit 044d984

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Objects/unicodeobject.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13796,14 +13796,14 @@ _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
1379613796
assert(ucs1lib_find_max_char((Py_UCS1*)str, (Py_UCS1*)str + len) < 128);
1379713797

1379813798
if (writer->buffer == NULL && !writer->overallocate) {
13799-
PyObject *str;
13800-
13801-
str = _PyUnicode_FromASCII(str, len);
13799+
PyObject *s;
13800+
13801+
s = _PyUnicode_FromASCII(str, len);
1380213802
if (str == NULL)
1380313803
return -1;
1380413804

1380513805
writer->readonly = 1;
13806-
writer->buffer = str;
13806+
writer->buffer = s;
1380713807
_PyUnicodeWriter_Update(writer);
1380813808
writer->pos += len;
1380913809
return 0;
@@ -13816,10 +13816,10 @@ _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
1381613816
{
1381713817
case PyUnicode_1BYTE_KIND:
1381813818
{
13819-
const Py_UCS1 *str = (const Py_UCS1 *)str;
13819+
const Py_UCS1 *s = (const Py_UCS1 *)str;
1382013820
Py_UCS1 *data = writer->data;
1382113821

13822-
memcpy(data + writer->pos, str, len);
13822+
memcpy(data + writer->pos, s, len);
1382313823
break;
1382413824
}
1382513825
case PyUnicode_2BYTE_KIND:

0 commit comments

Comments
 (0)