8000 gh-99266: ctypes: Preserve a more detailed exception in _SimpleCData.from_param by kamilturek · Pull Request #99760 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-99266: ctypes: Preserve a more detailed exception in _SimpleCData.from_param #99760

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 15 commits into from
Jan 21, 2023
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
Add another missing reference decrementation
  • Loading branch information
kamilturek committed Jan 21, 2023
commit 924e7bf0b889b7fb990592fa0be1b980c105b0d8
3 changes: 3 additions & 0 deletions Modules/_ctypes/_ctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2235,6 +2235,9 @@ PyCSimpleType_from_param(PyObject *type, PyObject *value)
Py_DECREF(parg);

if (_PyObject_LookupAttr(value, &_Py_ID(_as_parameter_), &as_parameter) < 0) {
Py_XDECREF(exc);
Py_XDECREF(val);
Py_XDECREF(tb);
return NULL;
}
if (as_parameter) {
Expand Down
0