mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
This commit is contained in:
parent
b1994b4a5d
commit
6819210b9e
129 changed files with 1090 additions and 1250 deletions
|
|
@ -935,8 +935,7 @@ static PyMethodDef zlib_methods[] =
|
|||
};
|
||||
|
||||
static PyTypeObject Comptype = {
|
||||
PyObject_HEAD_INIT(0)
|
||||
0,
|
||||
PyVarObject_HEAD_INIT(0, 0)
|
||||
"zlib.Compress",
|
||||
sizeof(compobject),
|
||||
0,
|
||||
|
|
@ -952,8 +951,7 @@ static PyTypeObject Comptype = {
|
|||
};
|
||||
|
||||
static PyTypeObject Decomptype = {
|
||||
PyObject_HEAD_INIT(0)
|
||||
0,
|
||||
PyVarObject_HEAD_INIT(0, 0)
|
||||
"zlib.Decompress",
|
||||
sizeof(compobject),
|
||||
0,
|
||||
|
|
@ -987,8 +985,8 @@ PyMODINIT_FUNC
|
|||
PyInit_zlib(void)
|
||||
{
|
||||
PyObject *m, *ver;
|
||||
Comptype.ob_type = &PyType_Type;
|
||||
Decomptype.ob_type = &PyType_Type;
|
||||
Py_Type(&Comptype) = &PyType_Type;
|
||||
Py_Type(&Decomptype) = &PyType_Type;
|
||||
m = Py_InitModule4("zlib", zlib_methods,
|
||||
zlib_module_documentation,
|
||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue