mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Merge of descr-branch back into trunk.
This commit is contained in:
parent
52d55a3926
commit
6d6c1a35e0
57 changed files with 6923 additions and 1309 deletions
|
|
@ -96,12 +96,6 @@ static PyMethodDef iter_methods[] = {
|
|||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
static PyObject *
|
||||
iter_getattr(seqiterobject *it, char *name)
|
||||
{
|
||||
return Py_FindMethod(iter_methods, (PyObject *)it, name);
|
||||
}
|
||||
|
||||
PyTypeObject PySeqIter_Type = {
|
||||
PyObject_HEAD_INIT(&PyType_Type)
|
||||
0, /* ob_size */
|
||||
|
|
@ -111,7 +105,7 @@ PyTypeObject PySeqIter_Type = {
|
|||
/* methods */
|
||||
(destructor)iter_dealloc, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
(getattrfunc)iter_getattr, /* tp_getattr */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_compare */
|
||||
0, /* tp_repr */
|
||||
|
|
@ -121,7 +115,7 @@ PyTypeObject PySeqIter_Type = {
|
|||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
PyObject_GenericGetAttr, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */
|
||||
|
|
@ -132,6 +126,13 @@ PyTypeObject PySeqIter_Type = {
|
|||
0, /* tp_weaklistoffset */
|
||||
(getiterfunc)iter_getiter, /* tp_iter */
|
||||
(iternextfunc)iter_iternext, /* tp_iternext */
|
||||
iter_methods, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
0, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
};
|
||||
|
||||
/* -------------------------------------- */
|
||||
|
|
@ -197,12 +198,6 @@ static PyMethodDef calliter_methods[] = {
|
|||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
static PyObject *
|
||||
calliter_getattr(calliterobject *it, char *name)
|
||||
{
|
||||
return Py_FindMethod(calliter_methods, (PyObject *)it, name);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
calliter_iternext(calliterobject *it)
|
||||
{
|
||||
|
|
@ -228,7 +223,7 @@ PyTypeObject PyCallIter_Type = {
|
|||
/* methods */
|
||||
(destructor)calliter_dealloc, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
(getattrfunc)calliter_getattr, /* tp_getattr */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_compare */
|
||||
0, /* tp_repr */
|
||||
|
|
@ -238,7 +233,7 @@ PyTypeObject PyCallIter_Type = {
|
|||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
PyObject_GenericGetAttr, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */
|
||||
|
|
@ -249,4 +244,11 @@ PyTypeObject PyCallIter_Type = {
|
|||
0, /* tp_weaklistoffset */
|
||||
(getiterfunc)iter_getiter, /* tp_iter */
|
||||
(iternextfunc)calliter_iternext, /* tp_iternext */
|
||||
calliter_methods, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
0, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue