gh-132983: Reduce the size of `_zstdmodule.h` by AA-Turner · Pull Request #133793 · python/cpython
We should try and reduce the content in the header file, as it is exposed to anything that includes it.
mt_continue_should_break()moves intocompressor.c- The
decompress_typeenum moves intodecompressor.c - Replace
#pragma once(not used for any other modules or non-vendored code) with guard defines - Use angle-bracket includes for
z{std,dict}.h - Add a
zstddict.hheader file to contain the definition of theZstdDictstruct - Move the
ZstdCompressorstruct tocompressor.c(likewise for decompressor) - Make
PyModuleDef _zstdmodulestatic
A
hugovk
changed the title
GH-132983: Reduce the size of
gh-132983: Reduce the size of _zstdmodule.h_zstdmodule.h
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fun that the diff for reducing the size is +165/-164.
Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
(cherry picked from commit 1a548c0) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AA-Turner added a commit that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters