[3.14] gh-132983: Remove pyzstd in identifiers (GH-133535) by miss-islington · Pull Request #133629 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Modules/_zstd/_zstdmodule.h
16 changes: 8 additions & 8 deletions Modules/_zstd/compressor.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class _zstd.ZstdCompressor "ZstdCompressor *" "clinic_state()->ZstdCompressor_ty

#define ZstdCompressor_CAST(op) ((ZstdCompressor *)op)

int
_PyZstd_set_c_parameters(ZstdCompressor *self, PyObject *level_or_options,
const char *arg_name, const char* arg_type)
static int
_zstd_set_c_parameters(ZstdCompressor *self, PyObject *level_or_options,
const char *arg_name, const char* arg_type)
{
size_t zstd_ret;
_zstd_state* const mod_state = PyType_GetModuleState(Py_TYPE(self));
Expand Down Expand Up @@ -197,8 +197,8 @@ _get_CDict(ZstdDict *self, int compressionLevel)
return cdict;
}

int
_PyZstd_load_c_dict(ZstdCompressor *self, PyObject *dict) {
static int
_zstd_load_c_dict(ZstdCompressor *self, PyObject *dict) {

size_t zstd_ret;
_zstd_state* const mod_state = PyType_GetModuleState(Py_TYPE(self));
Expand Down Expand Up @@ -385,20 +385,20 @@ _zstd_ZstdCompressor___init___impl(ZstdCompressor *self, PyObject *level,

/* Set compressLevel/options to compression context */
if (level != Py_None) {
if (_PyZstd_set_c_parameters(self, level, "level", "int") < 0) {
if (_zstd_set_c_parameters(self, level, "level", "int") < 0) {
return -1;
}
}

if (options != Py_None) {
if (_PyZstd_set_c_parameters(self, options, "options", "dict") < 0) {
if (_zstd_set_c_parameters(self, options, "options", "dict") < 0) {
return -1;
}
}

/* Load dictionary to compression context */
if (zstd_dict != Py_None) {
if (_PyZstd_load_c_dict(self, zstd_dict) < 0) {
if (_zstd_load_c_dict(self, zstd_dict) < 0) {
return -1;
}

Expand Down
12 changes: 6 additions & 6 deletions Modules/_zstd/decompressor.c