Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C, parse attributes #7471

Merged
merged 1 commit into from Apr 13, 2020
Merged

Conversation

jakobandersen
Copy link
Contributor

Feature or Bugfix

  • Feature
  • Bugfix

The 3.0 version of the C domain got more strict, resulting in warnings for declarations that are not technically C, but are rather common, so it would be nice to release this PR soon.

Purpose

Parse attributes in declarations and allow users to define their own identifiers to be parsed as attributes (e.g., when the actual attribute is hidden behind a macro). For example:

.. c:function:: LIGHTGBM_C_EXPORT int LGBM_BoosterFree(int handle)

Here the LIGHTGBM_C_EXPORT identifier is a macro that expands to a symbol visibility attribute.

Relates

@jakobandersen jakobandersen added type:bug type:enhancement enhance or introduce a new feature domains:c labels Apr 13, 2020
@tk0miya
Copy link
Member

tk0miya commented Apr 13, 2020

I'm not good at the implementation of C/C++ domain. So I can't review this sooner.
But I can say okay to merged this into 3.0.x branch if you worried about merging "enhancement" changes into the branch.

@jakobandersen
Copy link
Contributor Author

But I can say okay to merged this into 3.0.x branch if you worried about merging "enhancement" changes into the branch.

Thanks, I'll merge it as soon as the CI goes through.

@jakobandersen jakobandersen merged commit e65fb93 into sphinx-doc:3.0.x Apr 13, 2020
@jakobandersen jakobandersen deleted the c_attributes branch April 13, 2020 11:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
domains:c type:bug type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants