> Am 24.09.2017 um 12:23 schrieb Mauro Carvalho Che
>
> v2: handle embedded structs/unions from inner to outer
>
> When we have multiple levels of embedded structs,
>
> we need a smarter rule that will be removing nested structs
> from the inner to the outer ones. So, changed the parsing rule to
> remove nested structs/unions from the inner ones to the outer
> ones, while it matches.
argh, sub-nested I forgot.
> scripts/kernel-doc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 9d3eafea58f0..443e1bcc78db 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -2173,7 +2173,7 @@ sub dump_struct($$) {
> my $members = $3;
>
> # ignore embedded structs or unions
> - $members =~ s/({.*})//g;
> + while ($members =~ s/({[^\{\}]*})//g) {};
> $nested = $1;
I haven't tested this patch, but I guess with you might get
some "excess struct member" warnings, since the value of
'nested' is just the content of the last match.
Here is what I have done in the python version:
https://github.com/return42/linuxdoc/commit/8d9394
and here is the impact:
https://github.com/return42/sphkerneldoc/commit/2ff22cf82de3236c1ec7616bd4b65ce2aedd2a90
As you can see in my linked patch above, I implemented it by
hand and collected all the 'nested' stuff. I guess this
is impossible with regexpr.
I recommend to do something similar with the perl script.
Since your perl is better than my; could you please prepare such a v3 patch?
Thanks!
-- Markus --
>
> # ignore members marked private:
> --
> 2.13.5
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-doc" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html