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

Skip to content

gh-62897: Update PyUnicode parameter names #12680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 5, 2023
Prev Previous commit
Next Next commit
bpo-18697: Fix issue with variable names being overriden
  • Loading branch information
CraftSpider committed Feb 2, 2020
commit 044d984194b65fcada4ed8c14a1ccc2fddfaf50d
12 changes: 6 additions & 6 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -13796,14 +13796,14 @@ _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
assert(ucs1lib_find_max_char((Py_UCS1*)str, (Py_UCS1*)str + len) < 128);

if (writer->buffer == NULL && !writer->overallocate) {
PyObject *str;

str = _PyUnicode_FromASCII(str, len);
PyObject *s;
s = _PyUnicode_FromASCII(str, len);
if (str == NULL)
return -1;

writer->readonly = 1;
writer->buffer = str;
writer->buffer = s;
_PyUnicodeWriter_Update(writer);
writer->pos += len;
return 0;
Expand All @@ -13816,10 +13816,10 @@ _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
{
case PyUnicode_1BYTE_KIND:
{
const Py_UCS1 *str = (const Py_UCS1 *)str;
const Py_UCS1 *s = (const Py_UCS1 *)str;
Py_UCS1 *data = writer->data;

memcpy(data + writer->pos, str, len);
memcpy(data + writer->pos, s, len);
break;
}
case PyUnicode_2BYTE_KIND:
Expand Down