-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allow for C arguments to be labelled as "Parameters" or "Arguments" #12806
Comments
Can you remind us of the difference between arguments and parameters and how the current options aren't adequate for C? |
It's just the label shown in the documentation. There's a distinction between arguments and parameters in C and some developers prefer the former label when writing their documentation. Currently, only the "Parameters" label can be used. |
@torressa I don't have Brian Kernighan and Dennis Ritchie's The C Programming Language on hand, but for a definition we can mention Stack Overflow's canonical: What's the difference between an argument and a parameter?
Would it be a viable alternative to use |
I'm not sure, I tried replacing a function .. c:function:: int foo(Bar *bar)
This is my foo function description
Need a new line
Arguments
.. c:var:: Bar *bar
This is what bar is Maybe there's a better way but this renders very different to the standard and more concise: .. c:function:: int foo(Bar *bar)
This is my foo function description
:arg bar: This is what bar is Could we not add an option for a function that allows for this switch (similar to |
We found a solution by overriding the |
Describe the solution you'd like
The easiest solution would be to split
arg
andargument
to aParameters
label with a newTypedField
sphinx/sphinx/domains/c/__init__.py
Lines 297 to 308 in 0504903
Describe alternatives you've considered
Or toggle the label with a flag somehow.
Happy to open a PR if this looks like a viable solution and of course for alternative solutions.
The text was updated successfully, but these errors were encountered: