Re: [PATCH v2] docs: automarkup.py: Allow automatic cross-reference inside C namespace

From: Jonathan Corbet
Date: Wed Nov 18 2020 - 15:39:28 EST


On Tue, 17 Nov 2020 12:30:13 +0000
Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxxx> wrote:

> > Hmm... do we still need to skip syscalls?
>
> Yeah, I see what you mean. Since you moved the syscalls in the docs inside
> namespaces, there shouldn't be any syscall definitions in the global scope
> anymore and therefore we don't need to skip them any longer.
>
> I tried it out here and indeed it works fine without skipping them.
>
> But I wonder if it would be a good safety measure to leave it there anyway. We
> never want to cross-reference to syscalls in the global scope, so if we continue
> doing that skip, even if someone accidentally adds a syscall definition outside
> a c:namespace, this will prevent cross-references to it anyway.
>
> What do you think?

I put the original skip logic in there to keep it from even trying to
cross-reference common syscall names; I wasn't really even worried about
false references at that point. I'd leave the check in unless it's
actively causing trouble somewhere...

Thanks,

jon