mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
Added all PyTypeObjects to the appropriate header files.
Before the patch a lot of internal types weren't available in the header files. The patch exposes the new iterators, views and some other types to all C modules. I've also renamed some of the types and tp_names.
This commit is contained in:
parent
513b2ac76c
commit
a22e8bdfd9
17 changed files with 56 additions and 44 deletions
|
|
@ -199,7 +199,7 @@ calliter_iternext(calliterobject *it)
|
|||
|
||||
PyTypeObject PyCallIter_Type = {
|
||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||
"callable-iterator", /* tp_name */
|
||||
"callable_iterator", /* tp_name */
|
||||
sizeof(calliterobject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
|
|
@ -240,7 +240,7 @@ typedef struct zipiterobject_t {
|
|||
PyTupleObject *result; /* Reusable tuple for optimization */
|
||||
} zipiterobject;
|
||||
|
||||
static PyTypeObject PyZipIter_Type; /* Forward */
|
||||
/* Forward */
|
||||
|
||||
PyObject *
|
||||
_PyZip_CreateIter(PyObject* args)
|
||||
|
|
@ -367,7 +367,7 @@ zipiter_next(zipiterobject *zit)
|
|||
return result;
|
||||
}
|
||||
|
||||
static PyTypeObject PyZipIter_Type = {
|
||||
PyTypeObject PyZipIter_Type = {
|
||||
PyVarObject_HEAD_INIT(0, 0)
|
||||
"zip_iterator", /* tp_name */
|
||||
sizeof(zipiterobject), /* tp_basicsize */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue