8000 bpo-35441: Remove dead and buggy code related to PyList_SetItem() by ZackerySpytz · Pull Request #11033 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-35441: Remove dead and buggy code related to PyList_SetItem() #11033

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address the review comment.
  • Loading branch information
ZackerySpytz committed Dec 8, 2018
commit 2a9bb21b5f4631a35133e963934043b9cf4354ae
11 changes: 4 additions & 7 deletions Modules/_localemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,13 @@ copy_grouping(const char* s)
do {
i++;
val = PyLong_FromLong(s[i]);
if (!val)
break;
if (val == NULL) {
Py_DECREF(result);
return NULL;
}
PyList_SET_ITEM(result, i, val);
} while (s[i] != '\0' && s[i] != CHAR_MAX);

if (!val) {
Py_DECREF(result);
return NULL;
}

return result;
}

Expand Down
0