mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Separate out a \cfuncline macro from the cfuncdesc environment.
This matches many other of the *desc environments, and is useful when multiple functions share a description.
This commit is contained in:
parent
1251b0eb24
commit
34adb8a8ec
2 changed files with 25 additions and 9 deletions
|
@ -585,9 +585,12 @@
|
|||
% \begin{cfuncdesc}[refcount]{type}{name}{arglist}
|
||||
% Note that the [refcount] slot should only be filled in by
|
||||
% tools/anno-api.py; it pulls the value from the refcounts database.
|
||||
\newcommand{\cfuncline}[3]{
|
||||
\item[\code{#1 \bfcode{#2}(\py@varvars{#3})}\index{#2@{\py@idxcode{#2()}}}]
|
||||
}
|
||||
\newenvironment{cfuncdesc}[4][\py@badkey]{
|
||||
\begin{fulllineitems}
|
||||
\item[\code{#2 \bfcode{#3}(\py@varvars{#4})}\index{#3@{\py@idxcode{#3()}}}]
|
||||
\cfuncline{#2}{#3}{#4}
|
||||
\ifx#1\@undefined\else%
|
||||
\emph{Return value: \textbf{#1}.}\\
|
||||
\fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue