8000 MNT: replace _PyDict_GetItemStringWithError with PyDict_GetItemStringRef by ngoldbaum · Pull Request #26282 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MNT: replace _PyDict_GetItemStringWithError with PyDict_GetItemStringRef #26282

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 5 commits into from
Apr 17, 2024
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
MNT: fix issue spotted in code review
  • Loading branch information
ngoldbaum committed Apr 15, 2024
commit 64ffcd1ccc0c8e56e5f608b6c50016bab4c99719
5 changes: 2 additions & 3 deletions numpy/_core/src/common/ufunc_override.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,14 @@ PyUFuncOverride_GetOutObjects(PyObject *kwds, PyObject **out_kwd_obj, PyObject *
seq = PySequence_Fast(*out_kwd_obj,
"Could not convert object to sequence");
if (seq == NULL) {
*out_kwd_obj = NULL;
Py_CLEAR(*out_kwd_obj);
return -1;
}
*out_objs = PySequence_Fast_ITEMS(seq);
*out_kwd_obj = seq;
Py_SETREF(*out_kwd_obj, seq);
return PySequence_Fast_GET_SIZE(seq);
}
else {
Py_INCREF(*out_kwd_obj);
*out_objs = out_kwd_obj;
return 1;
}
Expand Down
0