mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
GH-132983: PEP 7 and Argument Clinic changes for zstd (#133791)
This commit is contained in:
parent
98e2c3af47
commit
1978904a2f
8 changed files with 132 additions and 151 deletions
|
@ -198,7 +198,8 @@ success:
|
|||
}
|
||||
|
||||
static int
|
||||
_zstd_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));
|
||||
|
@ -412,7 +413,7 @@ _zstd_ZstdCompressor___init___impl(ZstdCompressor *self, PyObject *level,
|
|||
return 0;
|
||||
}
|
||||
|
||||
PyObject *
|
||||
static PyObject *
|
||||
compress_impl(ZstdCompressor *self, Py_buffer *data,
|
||||
ZSTD_EndDirective end_directive)
|
||||
{
|
||||
|
@ -655,8 +656,7 @@ _zstd_ZstdCompressor_flush_impl(ZstdCompressor *self, int mode)
|
|||
static PyMethodDef ZstdCompressor_methods[] = {
|
||||
_ZSTD_ZSTDCOMPRESSOR_COMPRESS_METHODDEF
|
||||
_ZSTD_ZSTDCOMPRESSOR_FLUSH_METHODDEF
|
||||
|
||||
{0}
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
PyDoc_STRVAR(ZstdCompressor_last_mode_doc,
|
||||
|
@ -668,7 +668,7 @@ PyDoc_STRVAR(ZstdCompressor_last_mode_doc,
|
|||
static PyMemberDef ZstdCompressor_members[] = {
|
||||
{"last_mode", Py_T_INT, offsetof(ZstdCompressor, last_mode),
|
||||
Py_READONLY, ZstdCompressor_last_mode_doc},
|
||||
{0}
|
||||
{NULL}
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -696,11 +696,11 @@ static PyType_Slot zstdcompressor_slots[] = {
|
|||
{Py_tp_doc, (char*)_zstd_ZstdCompressor___init____doc__},
|
||||
{Py_tp_traverse, ZstdCompressor_traverse},
|
||||
{Py_tp_clear, ZstdCompressor_clear},
|
||||
{0}
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
PyType_Spec zstd_compressor_type_spec = {
|
||||
.name = "_zstd.ZstdCompressor",
|
||||
.name = "compression.zstd.ZstdCompressor",
|
||||
.basicsize = sizeof(ZstdCompressor),
|
||||
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
|
||||
.slots = zstdcompressor_slots,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue