diff options
| author | Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> | 2022-06-21 10:19:26 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-21 10:19:26 (GMT) |
| commit | 5fcfdd87c9b5066a581d3ccb4b2fede938f343ec (patch) | |
| tree | 8d333af15ee960d109d32163e005beefb2a16900 /Include/internal/pycore_range.h | |
| parent | c735d545343c3ab002c62596b2fb2cfa4488b0af (diff) | |
| download | cpython-5fcfdd87c9b5066a581d3ccb4b2fede938f343ec.zip cpython-5fcfdd87c9b5066a581d3ccb4b2fede938f343ec.tar.gz cpython-5fcfdd87c9b5066a581d3ccb4b2fede938f343ec.tar.bz2 | |
GH-91432: Specialize FOR_ITER (GH-91713)
* Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations.
* Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
Diffstat (limited to 'Include/internal/pycore_range.h')
| -rw-r--r-- | Include/internal/pycore_range.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Include/internal/pycore_range.h b/Include/internal/pycore_range.h new file mode 100644 index 0000000..809e89a --- /dev/null +++ b/Include/internal/pycore_range.h @@ -0,0 +1,22 @@ +#ifndef Py_INTERNAL_RANGE_H +#define Py_INTERNAL_RANGE_H +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef Py_BUILD_CORE +# error "this header requires Py_BUILD_CORE define" +#endif + +typedef struct { + PyObject_HEAD + long index; + long start; + long step; + long len; +} _PyRangeIterObject; + +#ifdef __cplusplus +} +#endif +#endif /* !Py_INTERNAL_RANGE_H */ |
