-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -26,8 +26,8 @@ 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) | ||||||
_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)); | ||||||
|
@@ -198,7 +198,7 @@ _get_CDict(ZstdDict *self, int compressionLevel) | |||||
} | ||||||
|
||||||
int | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
See above about static linkage. |
||||||
_PyZstd_load_c_dict(ZstdCompressor *self, PyObject *dict) { | ||||||
_zstd_load_c_dict(ZstdCompressor *self, PyObject *dict) { | ||||||
|
||||||
size_t zstd_ret; | ||||||
_zstd_state* const mod_state = PyType_GetModuleState(Py_TYPE(self)); | ||||||
|
@@ -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; | ||||||
} | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -62,7 +62,7 @@ _get_DDict(ZstdDict *self) | |||||
|
||||||
/* Set decompression parameters to decompression context */ | ||||||
int | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
See above about static linkage. |
||||||
_PyZstd_set_d_parameters(ZstdDecompressor *self, PyObject *options) | ||||||
_zstd_set_d_parameters(ZstdDecompressor *self, PyObject *options) | ||||||
{ | ||||||
size_t zstd_ret; | ||||||
PyObject *key, *value; | ||||||
|
@@ -121,7 +121,7 @@ _PyZstd_set_d_parameters(ZstdDecompressor *self, PyObject *options) | |||||
|
||||||
/* Load dictionary or prefix to decompression context */ | ||||||
int | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
See above about static linkage. |
||||||
_PyZstd_load_d_dict(ZstdDecompressor *self, PyObject *dict) | ||||||
_zstd_load_d_dict(ZstdDecompressor *self, PyObject *dict) | ||||||
{ | ||||||
size_t zstd_ret; | ||||||
_zstd_state* const mod_state = PyType_GetModuleState(Py_TYPE(self)); | ||||||
|
@@ -709,7 +709,7 @@ _zstd_ZstdDecompressor___init___impl(ZstdDecompressor *self, | |||||
|
||||||
/* Load dictionary to decompression context */ | ||||||
if (zstd_dict != Py_None) { | ||||||
if (_PyZstd_load_d_dict(self, zstd_dict) < 0) { | ||||||
if (_zstd_load_d_dict(self, zstd_dict) < 0) { | ||||||
return -1; | ||||||
} | ||||||
|
||||||
|
@@ -720,7 +720,7 @@ _zstd_ZstdDecompressor___init___impl(ZstdDecompressor *self, | |||||
|
||||||
/* Set option to decompression context */ | ||||||
if (options != Py_None) { | ||||||
if (_PyZstd_set_d_parameters(self, options) < 0) { | ||||||
if (_zstd_set_d_parameters(self, options) < 0) { | ||||||
return -1; | ||||||
} | ||||||
} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these should have static linkage to keep this scoped to this translation unit.