Hello,

On Wed, 3 Sept 2025 at 04:05, Chengwen Feng <fengcheng...@huawei.com> wrote:
>
> Currently, the RTE_EXPORT_INTERNAL_SYMBOL, RTE_EXPORT_SYMBOL and
> RTE_EXPORT_EXPERIMENTAL_SYMBOL are placed at the beginning of APIs,
> but don't end with a semicolon. As a result, some IDEs cannot identify
> the APIs and cannot quickly jump to the definition.
>
> A semicolon is added to the end of above RTE_EXPORT_XXX_SYMBOL in this
> commit.
>
> And also redefine RTE_EXPORT_XXX_SYMBOL:
> #define RTE_EXPORT_XXX_SYMBOL(x, x) extern int dummy_rte_export_symbol
>
> Chengwen Feng (5):
>   lib: add semicolon when export symbol
>   lib: add semicolon when export experimental symbol
>   lib: add semicolon when export internal symbol
>   drivers: add semicolon when export any symbol
>   doc: update ABI versioning guide

I am skeptical about this series.

The current positionning should be seen as an additional info on the
return type, in the definition of the symbol.
Does it mean that this IDE would fail if we add any kind of
macros/attribute involving the symbol name?

Afaics, ctags can be taught to skip those macros and just behaves
correctly by adding in its config file:
-DRTE_EXPORT_EXPERIMENTAL_SYMBOL(a)=
-DRTE_EXPORT_INTERNAL_SYMBOL(a)=
-DRTE_EXPORT_SYMBOL(a)=

I think another option would be to move the call to export macros
after the whole definition of the symbol, though I prefer the current
position for readability.


-- 
David Marchand

Reply via email to