docs: automarkup: do not look up symbols twice
authorJonathan Corbet <corbet@lwn.net>
Thu, 30 Jun 2022 16:36:30 +0000 (10:36 -0600)
committerJonathan Corbet <corbet@lwn.net>
Thu, 7 Jul 2022 18:57:55 +0000 (12:57 -0600)
commit309027b57c61d4d168679d49fd11add0dfdce900
tree8dc346e54c37af767e34ada0b3779ccee36abeeb
parent26c82972f20f6b3fdbd77b2802693808da3c0c09
docs: automarkup: do not look up symbols twice

The automarkup code tries to look up symbols once as a function, and once
as a macro.  The Sphinx C domain code, though, totally ignores that
distinction and will return the same results either way.  So just look
things up once and be done with it; the resulting output does not change,
but htmldocs build time drops by about 5%.

Tested-by: Akira Yokosawa <akiyks@gmail.com>
Link: https://lore.kernel.org/r/20220630163630.714673-3-corbet@lwn.net
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/sphinx/automarkup.py