mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #9928: Properly initialize the types exported by the bz2 module.
This commit is contained in:
parent
ab58b5f90e
commit
70c6044913
2 changed files with 8 additions and 3 deletions
|
|
@ -62,6 +62,8 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #9928: Properly initialize the types exported by the bz2 module.
|
||||
|
||||
- Issue #1675951: Allow GzipFile to work with unseekable file objects.
|
||||
Patch by Florian Festi.
|
||||
|
||||
|
|
|
|||
|
|
@ -2155,9 +2155,12 @@ PyInit_bz2(void)
|
|||
{
|
||||
PyObject *m;
|
||||
|
||||
Py_TYPE(&BZ2File_Type) = &PyType_Type;
|
||||
Py_TYPE(&BZ2Comp_Type) = &PyType_Type;
|
||||
Py_TYPE(&BZ2Decomp_Type) = &PyType_Type;
|
||||
if (PyType_Ready(&BZ2File_Type) < 0)
|
||||
return NULL;
|
||||
if (PyType_Ready(&BZ2Comp_Type) < 0)
|
||||
return NULL;
|
||||
if (PyType_Ready(&BZ2Decomp_Type) < 0)
|
||||
return NULL;
|
||||
|
||||
m = PyModule_Create(&bz2module);
|
||||
if (m == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue