Skip to content

Extension modules with unneeded module state #94401

@erlend-aasland

Description

@erlend-aasland

Similar to #94395 and #94393.

The bz2 and overlapped extension modules both have unneeded module state. That is, their state only contains pointers to types that are only added to the module's dict, and not used anywhere else. This implies:

  • there is no need to allocate and deallocate module state
  • there is no need to implement the traverse/clear/free module methods
  • there is no need for a state struct, and related "get state" helpers

For each module, this amounts to approx. 50 fewer lines of code. Less code, less maintenance.

For extension modules with partial unneeded module state, it may be best to leave them as they are; consistency also has a value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesextension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions