Content-Length: 259996 | pFad | https://github.com/python/cpython/issues/105148

50 Make _PyASTOptimizeState internal to ast_opt.c · Issue #105148 · python/cpython · GitHub
Skip to content

Make _PyASTOptimizeState internal to ast_opt.c #105148

@iritkatriel

Description

@iritkatriel

ast_opt.c imports pycore_compile.c inly for _PyASTOptimizeState, which could be defined in ast_opt.c instead.

We need to change the signature of _PyAST_Optimize to take two integers (optimization level and flags) instead of a _PyASTOptimizeState pointer. This will slightly simplify the call sites of _PyAST_Optimize, where this struct is created just to hold those two ints and pass it to _PyAST_Optimize.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/105148

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy