Skip to content

Commit a99c5dd

Browse files
AA-Turneremmatyping
authored andcommitted
swap order of parameters in _get_param_bounds
1 parent 03fff3d commit a99c5dd

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

Lib/compression/zstd/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def bounds(self):
212212
213213
Both lower and upper bounds are inclusive.
214214
"""
215-
return _zstd._get_param_bounds(is_compress=True, parameter=self.value)
215+
return _zstd._get_param_bounds(self.value, is_compress=True)
216216

217217

218218
class DecompressionParameter(enum.IntEnum):
@@ -226,7 +226,7 @@ def bounds(self):
226226
227227
Both lower and upper bounds are inclusive.
228228
"""
229-
return _zstd._get_param_bounds(is_compress=False, parameter=self.value)
229+
return _zstd._get_param_bounds(self.value, is_compress=False)
230230

231231

232232
class Strategy(enum.IntEnum):

Modules/_zstd/_zstdmodule.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -401,18 +401,18 @@ _zstd__finalize_dict_impl(PyObject *module, PyBytesObject *custom_dict_bytes,
401401
/*[clinic input]
402402
_zstd._get_param_bounds
403403
404-
is_compress: bool
405-
True for CompressionParameter, False for DecompressionParameter.
406404
parameter: int
407405
The parameter to get bounds.
406+
is_compress: bool
407+
True for CompressionParameter, False for DecompressionParameter.
408408
409409
Internal function, get CompressionParameter/DecompressionParameter bounds.
410410
[clinic start generated code]*/
411411

412412
static PyObject *
413-
_zstd__get_param_bounds_impl(PyObject *module, int is_compress,
414-
int parameter)
415-
/*[clinic end generated code: output=b751dc710f89ef55 input=1aae4fcf8faf4e0f]*/
413+
_zstd__get_param_bounds_impl(PyObject *module, int parameter,
414+
int is_compress)
415+
/*[clinic end generated code: output=9892cd822f937e79 input=884cd1a01125267d]*/
416416
{
417417
ZSTD_bounds bound;
418418
if (is_compress) {

Modules/_zstd/clinic/_zstdmodule.c.h

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)