Skip to content

gh-132983: Remove pyzstd in identifiers #133535

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rogdham
Copy link
Contributor

@Rogdham Rogdham commented May 6, 2025

The _PyZstd_xxx extern functions were leftover artifacts of the move from pyzstd to cpython.

I have renamed them to the _zstd_xxx convention used for private functions.

@python-cla-bot
Copy link

python-cla-bot bot commented May 6, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@Rogdham Rogdham marked this pull request as ready for review May 6, 2025 20:04
@Rogdham
Copy link
Contributor Author

Rogdham commented May 6, 2025

Thanks @emmatyping for the explanation about the context, pinging you for review as suggested 🤗

Copy link
Member

@emmatyping emmatyping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just want to make sure we make these static since they are local to their translation unit (file).

@@ -26,8 +26,8 @@ class _zstd.ZstdCompressor "ZstdCompressor *" "clinic_state()->ZstdCompressor_ty
#define ZstdCompressor_CAST(op) ((ZstdCompressor *)op)

int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int
static int

I believe these should have static linkage to keep this scoped to this translation unit.

@@ -198,7 +198,7 @@ _get_CDict(ZstdDict *self, int compressionLevel)
}

int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int
static int

See above about static linkage.

@@ -62,7 +62,7 @@ _get_DDict(ZstdDict *self)

/* Set decompression parameters to decompression context */
int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int
static int

See above about static linkage.

@@ -121,7 +121,7 @@ _PyZstd_set_d_parameters(ZstdDecompressor *self, PyObject *options)

/* Load dictionary or prefix to decompression context */
int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int
static int

See above about static linkage.

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

Successfully merging this pull request may close these issues.

2 participants