From bc3f6613ba44adcecacbdd106c840e8b6c054e22 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sun, 31 Jul 2022 13:03:32 +0200 Subject: VERSION 3.9: API change in c_forrange() with >= 3 args. csview updates. --- docs/ccommon_api.md | 12 ++++++------ docs/clist_api.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 82431d95..1a9fb30e 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -151,19 +151,19 @@ Declare an iterator and specify a range to iterate with a for loop. Like python' | Usage | Python equivalent | |:----------------------------------------------|:-------------------------------------| | `c_forrange (stop)` | `for _ in range(stop):` | -| `c_forrange (i, stop) // IterType = size_t` | `for i in range(stop):` | -| `c_forrange (i, IterType, stop)` | `for i in range(stop):` | -| `c_forrange (i, IterType, start, stop)` | `for i in range(start, stop):` | -| `c_forrange (i, IterType, start, stop, step)` | `for i in range(start, stop, step):` | +| `c_forrange (i, stop) // IntType = size_t` | `for i in range(stop):` | +| `c_forrange (IntType, i, stop)` | `for i in range(stop):` | +| `c_forrange (IntType, i, start, stop)` | `for i in range(start, stop):` | +| `c_forrange (IntType, i, start, stop, step)` | `for i in range(start, stop, step):` | ```c c_forrange (5) printf("x"); // xxxxx c_forrange (i, 5) printf(" %" PRIuMAX "", i); // 0 1 2 3 4 -c_forrange (i, int, -3, 3) printf(" %d", i); +c_forrange (int, i, -3, 3) printf(" %d", i); // -3 -2 -1 0 1 2 -c_forrange (i, int, 30, 0, -5) printf(" %d", i); +c_forrange (int, i, 30, 0, -5) printf(" %d", i); // 30 25 20 15 10 5 ``` diff --git a/docs/clist_api.md b/docs/clist_api.md index 17ee3fa8..e870c8c6 100644 --- a/docs/clist_api.md +++ b/docs/clist_api.md @@ -113,7 +113,7 @@ int main() { 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0 }); - c_forrange (i, int, 1, 10) { + c_forrange (int, i, 1, 10) { if (i & 1) clist_d_push_front(&list, (float) i); else clist_d_push_back(&list, (float) i); } -- cgit v1.2.3