comparison Doc/texinputs/python.sty @ 23063:530aba3116a4 legacy-trunk

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.
author Fred Drake <fdrake@acm.org>
date Mon, 15 Apr 2002 20:48:40 +0000
parents d6322983069e
children bc00eeef0ac7
comparison
equal deleted inserted replaced
23062:c371bb3e8529 23063:530aba3116a4
583 583
584 % C functions ------------------------------------------------------------ 584 % C functions ------------------------------------------------------------
585 % \begin{cfuncdesc}[refcount]{type}{name}{arglist} 585 % \begin{cfuncdesc}[refcount]{type}{name}{arglist}
586 % Note that the [refcount] slot should only be filled in by 586 % Note that the [refcount] slot should only be filled in by
587 % tools/anno-api.py; it pulls the value from the refcounts database. 587 % tools/anno-api.py; it pulls the value from the refcounts database.
588 \newcommand{\cfuncline}[3]{
589 \item[\code{#1 \bfcode{#2}(\py@varvars{#3})}\index{#2@{\py@idxcode{#2()}}}]
590 }
588 \newenvironment{cfuncdesc}[4][\py@badkey]{ 591 \newenvironment{cfuncdesc}[4][\py@badkey]{
589 \begin{fulllineitems} 592 \begin{fulllineitems}
590 \item[\code{#2 \bfcode{#3}(\py@varvars{#4})}\index{#3@{\py@idxcode{#3()}}}] 593 \cfuncline{#2}{#3}{#4}
591 \ifx#1\@undefined\else% 594 \ifx#1\@undefined\else%
592 \emph{Return value: \textbf{#1}.}\\ 595 \emph{Return value: \textbf{#1}.}\\
593 \fi 596 \fi
594 }{\end{fulllineitems}} 597 }{\end{fulllineitems}}
595 598