|
5 | 5 | : This file is known to be processed by regen/embed.pl, autodoc.pl,
|
6 | 6 | : makedef.pl, Devel::PPPort, and porting/diag.t.
|
7 | 7 | :
|
8 |
| -: This file contains entries for various functions and macros defined by perl. |
9 |
| -: Each entry includes the name, parameters, and various attributes about it. |
10 |
| -: In most functions listed here, the name is a short name, and the function's |
11 |
| -: real name is the short one, prefixed by either 'Perl_' (for publicly visible |
12 |
| -: functions) or 'S_' (for internal-to-a-file static ones). In many instances a |
13 |
| -: macro is defined that is the name in this file, and which expands to call the |
14 |
| -: real (full) name, with any appropriate thread context paramaters, thus hiding |
15 |
| -: that detail from the typical code. |
| 8 | +: This file contains entries for various functions, macros, typedefs, and |
| 9 | +: arrays defined by perl. Each entry includes the name, parameters, and |
| 10 | +: various attributes about it. In most functions listed here, the name is a |
| 11 | +: short name, and the function's real name is the short one, prefixed by either |
| 12 | +: 'Perl_' (for publicly visible functions) or 'S_' (for internal-to-a-file |
| 13 | +: static ones). In many instances a macro is defined that is the name in this |
| 14 | +: file, and which expands to call the real (full) name, with any appropriate |
| 15 | +: thread context paramaters, thus hiding that detail from the typical code. |
16 | 16 | :
|
17 | 17 | : Many macros (as opposed to functions) listed here are the complete full name,
|
18 | 18 | : though we may want to start converting those to have full names.
|
|
140 | 140 | : =for apidoc_item name ...
|
141 | 141 | : =for apidoc_defn name ...
|
142 | 142 | :
|
143 |
| -: The purpose of these lines is to furnish documentation for functions and |
144 |
| -: macros. The lines tend to be placed near the source for the item they |
| 143 | +: The purpose of these lines is to furnish documentation for functions, |
| 144 | +: macros, etc. The lines tend to be placed near the source for the item they |
145 | 145 | : describe. autodoc.pl is run as part of the standard build process to
|
146 | 146 | : extract this documentation and build either perlapi.pod (from the elements
|
147 | 147 | : that are flagged as A in this file), or perlintern.pod (from the other
|
148 | 148 | : elements.
|
149 | 149 | :
|
150 |
| -: Functions need to be specified in this file, but macros may not necessarily |
151 |
| -: be. The information in this file is sufficient to generate a usage line for |
152 |
| -: the element to be documented; otherwise that information needs to be |
153 |
| -: specified in the apidoc-ish lines. |
154 |
| -: |
155 |
| -: 'apidoc_defn' was added to supplement, for macros, the information in this |
156 |
| -: file. It is designed to be placed at the point of definition of the macro |
157 |
| -: it is for, so that the information can easily be checked for correctness, |
158 |
| -: and you know at a glance that the macro actually has documentation. It |
159 |
| -: doesn't by itself create any documentation; instead the other apidoc lines |
160 |
| -: pull in information specified by these lines. Many of the lines in this |
161 |
| -: file for macros that don't also have the 'p' flag (described below) could be |
162 |
| -: pulled out of here and replaced by these lines throughout the source. It is |
163 |
| -: a goal to do that as convenience dictates. |
| 150 | +: Functions need to be specified in this file, but macros and other types of |
| 151 | +: elements may not necessarily be. The information in this file is sufficient |
| 152 | +: to generate a usage line for the element to be documented; otherwise that |
| 153 | +: information needs to be specified in the apidoc-ish lines. |
| 154 | +: |
| 155 | +: 'apidoc_defn' was added to supplement, for non-functions, the information in |
| 156 | +: this file. It is designed to be placed at the point of definition of the |
| 157 | +: element it is for, so that the information can easily be checked for |
| 158 | +: correctness, and you know at a glance that the element actually has |
| 159 | +: documentation. It doesn't by itself create any documentation; instead the |
| 160 | +: other apidoc lines pull in information specified by these lines. Many of the |
| 161 | +: lines in this file for macros that don't also have the 'p' flag (described |
| 162 | +: below) could be pulled out of here and replaced by these lines throughout the |
| 163 | +: source. It is a goal to do that as convenience dictates. |
164 | 164 | :
|
165 | 165 | : The other apidoc lines either have the usage data as part of the line, or
|
166 | 166 | : pull in the data from this file or apidoc_defn lines.
|
|
223 | 223 | :
|
224 | 224 | : The 'name' in any such line must not be the same as any in this file (i.e.,
|
225 | 225 | : no redundant definitions), and one of the flags on the apidoc lines must be
|
226 |
| -: 'm' or 'y', indicating it is not a function. |
| 226 | +: 'm', 'y', or '@', indicating it is not a function. |
227 | 227 | :
|
228 | 228 | : All but the name field of an apidoc_item line are optional, and if empty,
|
229 | 229 | : inherits from a corresponding apidoc_defn line, if one exists, or the
|
|
612 | 612 | :
|
613 | 613 | : 'y' Typedef. The element names a type rather than being a macro
|
614 | 614 | :
|
| 615 | +: '@' This entry is for an array, as opposed to a function or macro, etc. |
| 616 | +: |
| 617 | +: autodoc.pl automatically suppresses any usage information. |
| 618 | +: |
615 | 619 | : ';' autodoc.pl adds a terminating semi-colon to the usage example in the
|
616 | 620 | : documentation.
|
617 | 621 | :
|
|
0 commit comments