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:
Fred Drake 2002-04-15 20:48:40 +00:00
parent 1251b0eb24
commit 34adb8a8ec
2 changed files with 25 additions and 9 deletions

View file

@ -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