From 9a8d3d71071ca82c139dae5aa45cb0d4620ca9e3 Mon Sep 17 00:00:00 2001 From: Filip Varga Date: Mon, 23 May 2022 21:18:38 +0200 Subject: api: start enum values from 0 C enum values by default start from 0. All unassigned names should get value as value of previous name plus one. The problem was that default value was 0 and adding one for the first value would make generated api files start from 1 instead of 0. Type: fix Change-Id: I772d6411435648de3ec514f57025ef1acae87338 Signed-off-by: Filip Varga --- src/tools/vppapigen/vppapigen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/vppapigen') diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py index c7bc68180a8..944bf5e7135 100755 --- a/src/tools/vppapigen/vppapigen.py +++ b/src/tools/vppapigen/vppapigen.py @@ -362,7 +362,7 @@ class Enum(Processable): self.vla = False self.manual_print = False - count = 0 + count = -1 block2 = [] block3 = [] bc_set = False -- cgit 1.2.3-korg