Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GH-103082: Code cleanup from review. #103474

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 2 commits into from
Apr 29, 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
Follow PEP 7
  • Loading branch information
markshannon committed Apr 12, 2023
commit 63f7319d14f507ba6899917cf8eb88b3be2cd2d7
12 changes: 8 additions & 4 deletions 12 Python/instrumentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ static const uint8_t INSTRUMENTED_OPCODES[256] = {
static inline bool
opcode_has_event(int opcode)
{
return opcode < INSTRUMENTED_LINE &&
INSTRUMENTED_OPCODES[opcode] > 0;
return (
opcode < INSTRUMENTED_LINE &&
INSTRUMENTED_OPCODES[opcode] > 0
);
}

static inline bool
Expand Down Expand Up @@ -335,7 +337,8 @@ dump_monitors(const char *prefix, _Py_Monitors monitors, FILE*out)
/* Like _Py_GetBaseOpcode but without asserts.
* Does its best to give the right answer, but won't abort
* if something is wrong */
int get_base_opcode_best_attempt(PyCodeObject *code, int offset)
static int
get_base_opcode_best_attempt(PyCodeObject *code, int offset)
{
int opcode = _Py_OPCODE(_PyCode_CODE(code)[offset]);
if (INSTRUMENTED_OPCODES[opcode] != opcode) {
Expand Down Expand Up @@ -414,7 +417,8 @@ dump_instrumentation_data(PyCodeObject *code, int star, FILE*out)
assert(test); \
} while (0)

bool valid_opcode(int opcode)
static bool
valid_opcode(int opcode)
{
if (opcode > 0 &&
opcode != RESERVED &&
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.