Hi Pablo,

On Mon, Sep 30, 2019 at 04:17:53PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Sep 25, 2019 at 03:14:19PM +0200, Fernando Fernandez Mancera wrote:
> > Currently clang requires EXPORT_SYMBOL() to be above the function
> > implementation. At the same time doxygen is not generating the proper
> > documentation because of that.
> >
> > This patch solves that problem but EXPORT_SYMBOL looks less like the Linux
> > kernel way exporting symbols.
>
> Applied, thanks.

I missed this earlier - take a look at the man pages / html doc with this patch.

E.g. man attr:

> attr(3)                             libmnl                            attr(3)
>
>
>
> NAME
>        attr - Netlink attribute helpers
>
>    Functions
>        EXPORT_SYMBOL uint16_t mnl_attr_get_type (const struct nlattr *attr)
>        EXPORT_SYMBOL uint16_t mnl_attr_get_len (const struct nlattr *attr)
>        EXPORT_SYMBOL uint16_t mnl_attr_get_payload_len (const struct nlattr
>            *attr)
>        EXPORT_SYMBOL void * mnl_attr_get_payload (const struct nlattr *attr)
>        EXPORT_SYMBOL bool mnl_attr_ok (const struct nlattr *attr, int len)

The web pages are the same.

Shunting all the EXPORT_SYMBOL lines to the start of the file as in my rejected
patch might have been ugly, but at least it left the documentation looking as it
should.

I just finished making a patch for libnetfilter_queue using the redefined
EXPORT_SYMBOL as above but taking care to avoid generating lines over 80 chars
and preserving (or fixing!) alignment of subsequent parameter lines. But I won't
submit it, because it results in the same horrible documentation.

I think it should be not too onerous to move the EXPORT_SYMBOL lines to before
the start of documentation, which should satisfy both doxygen adn clang. Would
you like me to go ahead with that?

Cheers ... Duncan.

Reply via email to