diff options
| author | shadchin <[email protected]> | 2022-02-10 16:44:39 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:39 +0300 |
| commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
| tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Modules/_bz2module.c | |
| parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Modules/_bz2module.c')
| -rw-r--r-- | contrib/tools/python3/src/Modules/_bz2module.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/contrib/tools/python3/src/Modules/_bz2module.c b/contrib/tools/python3/src/Modules/_bz2module.c index 82f3be6c67b..880632c6234 100644 --- a/contrib/tools/python3/src/Modules/_bz2module.c +++ b/contrib/tools/python3/src/Modules/_bz2module.c @@ -3,7 +3,7 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" -#include "structmember.h" // PyMemberDef +#include "structmember.h" // PyMemberDef #include <bzlib.h> #include <stdio.h> @@ -347,10 +347,10 @@ static PyTypeObject BZ2Compressor_Type = { sizeof(BZ2Compressor), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BZ2Compressor_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ + 0, /* tp_vectorcall_offset */ 0, /* tp_getattr */ 0, /* tp_setattr */ - 0, /* tp_as_async */ + 0, /* tp_as_async */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ @@ -688,10 +688,10 @@ static PyTypeObject BZ2Decompressor_Type = { sizeof(BZ2Decompressor), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BZ2Decompressor_dealloc,/* tp_dealloc */ - 0, /* tp_vectorcall_offset */ + 0, /* tp_vectorcall_offset */ 0, /* tp_getattr */ 0, /* tp_setattr */ - 0, /* tp_as_async */ + 0, /* tp_as_async */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ @@ -726,32 +726,32 @@ static PyTypeObject BZ2Decompressor_Type = { /* Module initialization. */ -static int -_bz2_exec(PyObject *module) -{ - if (PyModule_AddType(module, &BZ2Compressor_Type) < 0) { - return -1; - } - - if (PyModule_AddType(module, &BZ2Decompressor_Type) < 0) { - return -1; - } - - return 0; -} - -static struct PyModuleDef_Slot _bz2_slots[] = { - {Py_mod_exec, _bz2_exec}, - {0, NULL} -}; - +static int +_bz2_exec(PyObject *module) +{ + if (PyModule_AddType(module, &BZ2Compressor_Type) < 0) { + return -1; + } + + if (PyModule_AddType(module, &BZ2Decompressor_Type) < 0) { + return -1; + } + + return 0; +} + +static struct PyModuleDef_Slot _bz2_slots[] = { + {Py_mod_exec, _bz2_exec}, + {0, NULL} +}; + static struct PyModuleDef _bz2module = { PyModuleDef_HEAD_INIT, "_bz2", NULL, - 0, + 0, NULL, - _bz2_slots, + _bz2_slots, NULL, NULL, NULL @@ -760,5 +760,5 @@ static struct PyModuleDef _bz2module = { PyMODINIT_FUNC PyInit__bz2(void) { - return PyModuleDef_Init(&_bz2module); + return PyModuleDef_Init(&_bz2module); } |
