Skip to content

this_instr should be const in generated code. this_instr is generated, and should be const. #125039

Description

@markshannon

Bug report

Bug description:

We currently generate

_Py_CODEUNIT *this_instr =...

we should generate

_Py_CODEUNIT* const this_instr =...

to prevent it being accidentally changed.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions