mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
gh-132983: Fix docstrings in `ZstdDict` (#137321)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
parent
158b28dd19
commit
676748d4da
2 changed files with 7 additions and 7 deletions
4
Modules/_zstd/clinic/zstddict.c.h
generated
4
Modules/_zstd/clinic/zstddict.c.h
generated
|
|
@ -198,7 +198,7 @@ PyDoc_STRVAR(_zstd_ZstdDict_as_prefix__doc__,
|
||||||
"1. Prefix is compatible with long distance matching, while dictionary is not.\n"
|
"1. Prefix is compatible with long distance matching, while dictionary is not.\n"
|
||||||
"2. It only works for the first frame, then the compressor/decompressor will\n"
|
"2. It only works for the first frame, then the compressor/decompressor will\n"
|
||||||
" return to no prefix state.\n"
|
" return to no prefix state.\n"
|
||||||
"3. When decompressing, must use the same prefix as when compressing.\"");
|
"3. When decompressing, must use the same prefix as when compressing.");
|
||||||
#if defined(_zstd_ZstdDict_as_prefix_DOCSTR)
|
#if defined(_zstd_ZstdDict_as_prefix_DOCSTR)
|
||||||
# undef _zstd_ZstdDict_as_prefix_DOCSTR
|
# undef _zstd_ZstdDict_as_prefix_DOCSTR
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -222,4 +222,4 @@ _zstd_ZstdDict_as_prefix_get(PyObject *self, void *Py_UNUSED(context))
|
||||||
{
|
{
|
||||||
return _zstd_ZstdDict_as_prefix_get_impl((ZstdDict *)self);
|
return _zstd_ZstdDict_as_prefix_get_impl((ZstdDict *)self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=4696cbc722e5fdfc input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=f41d9e2e2cc2928f input=a9049054013a1b77]*/
|
||||||
|
|
|
||||||
|
|
@ -119,10 +119,10 @@ ZstdDict_dealloc(PyObject *ob)
|
||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(ZstdDict_dictid_doc,
|
PyDoc_STRVAR(ZstdDict_dictid_doc,
|
||||||
"the Zstandard dictionary, an int between 0 and 2**32.\n\n"
|
"The Zstandard dictionary, an int between 0 and 2**32.\n\n"
|
||||||
"A non-zero value represents an ordinary Zstandard dictionary, "
|
"A non-zero value represents an ordinary Zstandard dictionary,\n"
|
||||||
"conforming to the standardised format.\n\n"
|
"conforming to the standardised format.\n\n"
|
||||||
"The special value '0' means a 'raw content' dictionary,"
|
"A value of zero indicates a 'raw content' dictionary,\n"
|
||||||
"without any restrictions on format or content.");
|
"without any restrictions on format or content.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
@ -210,12 +210,12 @@ compress(dat, zstd_dict=zd.as_prefix)
|
||||||
1. Prefix is compatible with long distance matching, while dictionary is not.
|
1. Prefix is compatible with long distance matching, while dictionary is not.
|
||||||
2. It only works for the first frame, then the compressor/decompressor will
|
2. It only works for the first frame, then the compressor/decompressor will
|
||||||
return to no prefix state.
|
return to no prefix state.
|
||||||
3. When decompressing, must use the same prefix as when compressing."
|
3. When decompressing, must use the same prefix as when compressing.
|
||||||
[clinic start generated code]*/
|
[clinic start generated code]*/
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_zstd_ZstdDict_as_prefix_get_impl(ZstdDict *self)
|
_zstd_ZstdDict_as_prefix_get_impl(ZstdDict *self)
|
||||||
/*[clinic end generated code: output=6f7130c356595a16 input=d59757b0b5a9551a]*/
|
/*[clinic end generated code: output=6f7130c356595a16 input=45b3b6110f36d127]*/
|
||||||
{
|
{
|
||||||
return Py_BuildValue("Oi", self, DICT_TYPE_PREFIX);
|
return Py_BuildValue("Oi", self, DICT_TYPE_PREFIX);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue