mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +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
|
|
@ -81,7 +81,7 @@ partial_dealloc(partialobject *pto)
|
|||
Py_XDECREF(pto->args);
|
||||
Py_XDECREF(pto->kw);
|
||||
Py_XDECREF(pto->dict);
|
||||
pto->ob_type->tp_free(pto);
|
||||
Py_Type(pto)->tp_free(pto);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
@ -197,8 +197,7 @@ static PyGetSetDef partial_getsetlist[] = {
|
|||
};
|
||||
|
||||
static PyTypeObject partial_type = {
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /* ob_size */
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"functools.partial", /* tp_name */
|
||||
sizeof(partialobject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue