10000 gh-93382: Cache result of `PyCode_GetCode` in codeobject by Fidget-Spinner · Pull Request #93383 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-93382: Cache result of PyCode_GetCode in codeobject #93383

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 7 commits into from
Jun 3, 2022
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
Py_CLEAR already checks for NULL
  • Loading branch information
Fidget-Spinner committed Jun 3, 2022
commit 0c7226c10fb037b8aa74629e06662b5a1e7bf3db
4 changes: 1 addition & 3 deletions Objects/frameobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,7 @@ add_load_fast_null_checks(PyCodeObject *co)
}
}
// invalidate cached co_code object
if (co->_co_code != NULL) {
Py_CLEAR(co->_co_code);
}
Py_CLEAR(co->_co_code);
}

/* Setter for f_lineno - you can set f_lineno from within a trace function in
Expand Down
0