diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2023-02-03 09:54:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-03 09:54:27 (GMT) |
commit | a52cc9853fed39b5cc90b7ffb6a64249307a990b (patch) | |
tree | 11b86f1bae16dc3cd399f5332eb177f2caca1e30 /Modules/clinic | |
parent | 45d014e03ba7ba4c9c912120ec36b2aca02061f4 (diff) | |
download | cpython-a52cc9853fed39b5cc90b7ffb6a64249307a990b.zip cpython-a52cc9853fed39b5cc90b7ffb6a64249307a990b.tar.gz cpython-a52cc9853fed39b5cc90b7ffb6a64249307a990b.tar.bz2 |
gh-101277: Port more `itertools` static types to heap types (#101303)
Add dropwhile, takewhile, starmap, combinations*, and permutations types to module state.
Diffstat (limited to 'Modules/clinic')
-rw-r--r-- | Modules/clinic/itertoolsmodule.c.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index c492c33..be44246 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -345,7 +345,7 @@ static PyObject * itertools_cycle(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - PyTypeObject *base_tp = &cycle_type; + PyTypeObject *base_tp = clinic_state()->cycle_type; PyObject *iterable; if ((type == base_tp || type->tp_init == base_tp->tp_init) && @@ -377,7 +377,7 @@ static PyObject * itertools_dropwhile(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - PyTypeObject *base_tp = &dropwhile_type; + PyTypeObject *base_tp = clinic_state()->dropwhile_type; PyObject *func; PyObject *seq; @@ -409,7 +409,7 @@ static PyObject * itertools_takewhile(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - PyTypeObject *base_tp = &takewhile_type; + PyTypeObject *base_tp = clinic_state()->takewhile_type; PyObject *func; PyObject *seq; @@ -441,7 +441,7 @@ static PyObject * itertools_starmap(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - PyTypeObject *base_tp = &starmap_type; + PyTypeObject *base_tp = clinic_state()->starmap_type; PyObject *func; PyObject *seq; @@ -913,4 +913,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=c3069caac417e165 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b86fcd99bd32145e input=a9049054013a1b77]*/ |