tools: ynl-gen: print prototypes for recursive stuff
authorJakub Kicinski <kuba@kernel.org>
Wed, 13 Dec 2023 23:14:32 +0000 (15:14 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Dec 2023 01:51:21 +0000 (17:51 -0800)
commit7b5fe80ebc6312896a72f0187b00f7840579d4fd
treef47ae57975d23e5046919c71d2b069fd0ea44b97
parent461f25a2e4334767d3e306b08dbda054da1aaa30
tools: ynl-gen: print prototypes for recursive stuff

We avoid printing forward declarations and prototypes for most
types by sorting things topologically. But if structs nest we
do need the forward declarations, there's no other way.

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20231213231432.2944749-9-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py