Skip to content

Commit 25725c6

Browse files
committed
WS Cleanup Stage #10 - reflow C comments (2)
1 parent bc7e6fb commit 25725c6

17 files changed

+479
-294
lines changed

Diff for: cop.h

+23-17
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,12 @@ struct cop {
440440
#endif
441441
U32 cop_hints; /* hints bits from pragmata */
442442
U32 cop_seq; /* parse sequence number */
443-
char *cop_warnings; /* Lexical warnings bitmask vector. Refcounted
444-
shared copy of ${^WARNING_BITS}. This
445-
pointer either points at one of the magic
446-
values for warnings, or it points at a
447-
buffer constructed with rcpv_new(). Use the
443+
char *cop_warnings; /* Lexical warnings bitmask vector.
444+
Refcounted shared copy of
445+
${^WARNING_BITS}. This pointer either
446+
points at one of the magic values for
447+
warnings, or it points at a buffer
448+
constructed with rcpv_new(). Use the
448449
RCPV_LEN() macro to get its length.
449450
*/
450451
/* compile time state of %^H. See the comment in op.c for how
@@ -888,7 +889,8 @@ struct block_eval {
888889

889890
/* loop context */
890891
struct block_loop {
891-
LOOP *my_op; /* My op, that contains redo, next and last ops. */
892+
LOOP *my_op; /* My op, that contains redo,
893+
next and last ops. */
892894
union { /* different ways of locating the iteration variable */
893895
SV **svp; /* for lexicals: address of pad slot */
894896
GV *gv; /* for package vars */
@@ -913,7 +915,8 @@ struct block_loop {
913915
} lazysv;
914916
} state_u;
915917
#ifdef USE_ITHREADS
916-
PAD *oldcomppad; /* needed to map itervar_u.svp during thread clone */
918+
PAD *oldcomppad; /* needed to map itervar_u.svp
919+
during thread clone */
917920
#endif
918921
};
919922

@@ -1168,28 +1171,31 @@ struct context {
11681171

11691172
/* extra flags for Perl_call_* routines */
11701173
#define G_DISCARD 0x4 /* Call FREETMPS. Don't change this
1171-
without consulting the hash
1172-
actions codes defined in hv.h */
1173-
#define G_EVAL 0x8 /* Assume eval {} around subroutine call. */
1174+
without consulting the hash
1175+
actions codes defined in hv.h */
1176+
#define G_EVAL 0x8 /* Assume eval {} around
1177+
subroutine call. */
11741178
#define G_NOARGS 0x10 /* Don't construct a @_ array. */
11751179
#define G_KEEPERR 0x20 /* Warn for errors, don't overwrite $@ */
11761180
#define G_NODEBUG 0x40 /* Disable debugging at toplevel. */
11771181
#define G_METHOD 0x80 /* Calling method. */
11781182
#define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv
1179-
or fold_constants. */
1183+
or fold_constants. */
11801184
#define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef
1181-
A special case for UNSHIFT in
1182-
Perl_magic_methcall(). */
1185+
A special case for UNSHIFT in
1186+
Perl_magic_methcall(). */
11831187
#define G_WRITING_TO_STDERR 0x400 /* Perl_write_to_stderr() is calling
1184-
Perl_magic_methcall(). */
1188+
Perl_magic_methcall(). */
11851189
#define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */
1186-
#define G_METHOD_NAMED 0x1000 /* calling named method, eg without :: or ' */
1190+
#define G_METHOD_NAMED 0x1000 /* calling named method, eg
1191+
without :: or ' */
11871192
#define G_RETHROW 0x2000 /* eval_sv(): re-throw any error */
11881193

11891194
/* flag bits for PL_in_eval */
11901195
#define EVAL_NULL 0 /* not in an eval */
11911196
#define EVAL_INEVAL 1 /* some enclosing scope is an eval */
1192-
#define EVAL_WARNONLY 2 /* used by yywarn() when calling yyerror() */
1197+
#define EVAL_WARNONLY 2 /* used by yywarn() when
1198+
calling yyerror() */
11931199
#define EVAL_KEEPERR 4 /* set by Perl_call_sv if G_KEEPERR */
11941200
#define EVAL_INREQUIRE 8 /* The code is being required. */
11951201
#define EVAL_RE_REPARSING 0x10 /* eval_sv() called with G_RE_REPARSING */
@@ -1230,7 +1236,7 @@ struct stackinfo {
12301236
* #ifdef-ed for bincompat */
12311237
#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
12321238
/* high water mark: for checking if the stack was correctly
1233-
* extended / tested for extension by each pp function */
1239+
* extended / tested for extension by each pp function */
12341240
SSize_t si_stack_hwm;
12351241
#endif
12361242

Diff for: cv.h

+10-7
Original file line numberDiff line numberDiff line change
@@ -118,30 +118,33 @@ L<perlguts/Autoloading with XSUBs>.
118118
* but is renamed to avoid collision with an upcoming feature */
119119
#define CVf_NOWARN_AMBIGUOUS 0x0001
120120

121-
#define CVf_LVALUE 0x0002 /* CV return value can be used as lvalue */
121+
#define CVf_LVALUE 0x0002 /* CV return value can be
122+
used as lvalue */
122123
#define CVf_CONST 0x0004 /* inlinable sub */
123124
#define CVf_ISXSUB 0x0008 /* CV is an XSUB, not pure perl. */
124125

125126
#define CVf_WEAKOUTSIDE 0x0010 /* CvOUTSIDE isn't ref counted */
126127
#define CVf_CLONE 0x0020 /* anon CV uses external lexicals */
127128
#define CVf_CLONED 0x0040 /* a clone of one of those */
128129
#define CVf_ANON 0x0080 /* CV is not pointed to by a GV */
129-
#define CVf_UNIQUE 0x0100 /* sub is only called once (eg PL_main_cv,
130-
require, eval). */
131-
#define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV (esp.
132-
useful for special XSUBs) */
130+
#define CVf_UNIQUE 0x0100 /* sub is only called once (eg
131+
PL_main_cv, require, eval). */
132+
#define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV
133+
(esp. useful for special XSUBs) */
133134
#define CVf_CVGV_RC 0x0400 /* CvGV is reference counted */
134135
#if defined(PERL_CORE) || defined(PERL_EXT)
135136
# define CVf_SLABBED 0x0800 /* Holds refcount on op slab */
136137
#endif
137138
#define CVf_DYNFILE 0x1000 /* The filename is malloced */
138-
#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed sub name */
139+
#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed
140+
sub name */
139141
#define CVf_HASEVAL 0x4000 /* contains string eval */
140142
#define CVf_NAMED 0x8000 /* Has a name HEK */
141143
#define CVf_LEXICAL 0x10000 /* Omit package from name */
142144
#define CVf_ANONCONST 0x20000 /* :const - create anonconst op */
143145
#define CVf_SIGNATURE 0x40000 /* CV uses a signature */
144-
#define CVf_REFCOUNTED_ANYSV 0x80000 /* CvXSUBANY().any_sv is refcounted */
146+
#define CVf_REFCOUNTED_ANYSV 0x80000 /* CvXSUBANY().any_sv
147+
is refcounted */
145148

146149
/* This symbol for optimised communication between toke.c and op.c: */
147150
#define CVf_BUILTIN_ATTRS (CVf_NOWARN_AMBIGUOUS|CVf_LVALUE|CVf_ANONCONST)

Diff for: dosish.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# define PERL_SYS_INIT_BODY(c,v) \
2323
MALLOC_CHECK_TAINT2(*c,*v); PERLIO_INIT
2424
# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined,
25-
or somethin?" */
25+
or somethin?" */
2626
#endif
2727

2828
/* Generally add things last-in first-terminated. IO and memory

Diff for: form.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#define FF_SKIP 3 /* skip <arg> chars in format */
1414
#define FF_FETCH 4 /* get next item and set field size to <arg> */
1515
#define FF_CHECKNL 5 /* find max len of item (up to
16-
\n) that fits field */
16+
\n) that fits field */
1717
#define FF_CHECKCHOP 6 /* like CHECKNL, but up to highest split point */
1818
#define FF_SPACE 7 /* append padding space (diff
19-
of field, item size) */
19+
of field, item size) */
2020
#define FF_HALFSPACE 8 /* like FF_SPACE, but only append half as many */
2121
#define FF_ITEM 9 /* append a text item, while blanking ctrl chars */
2222
#define FF_CHOP 10 /* (for ^*) chop the current item */

Diff for: gv.h

+7-5
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,11 @@ Return the CV from the GV.
232232
time, so don't try to free what's there. */
233233
#define GV_ADDMULTI 0x02 /* add, pretending it has been added already;
234234
used also by gv_init_* */
235-
#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't already there */
236-
/* 0x08 UNUSED */
237-
#define GV_NOINIT 0x10 /* add, but don't init symbol, if type != PVGV */
235+
#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't
236+
already there */
237+
/* 0x08 UNUSED */
238+
#define GV_NOINIT 0x10 /* add, but don't init symbol,
239+
if type != PVGV */
238240
/* This is used by toke.c to avoid turing placeholder constants in the symbol
239241
table into full PVGVs with attached constant subroutines. */
240242
#define GV_NOADD_NOINIT 0x20 /* Don't add the symbol if it's not there.
@@ -258,8 +260,8 @@ Return the CV from the GV.
258260
/* Flags for gv_autoload_ */
259261
#define GV_AUTOLOAD_ISMETHOD 1 /* autoloading a method? */
260262

261-
/* SVf_UTF8 (more accurately the return value from SvUTF8) is also valid as
262-
a flag to various gv_* functions, so ensure it lies outside this range.
263+
/* SVf_UTF8 (more accurately the return value from SvUTF8) is also valid as
264+
a flag to various gv_* functions, so ensure it lies outside this range.
263265
*/
264266

265267
#define GV_NOADD_MASK \

Diff for: handy.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ END_EXTERN_C
16491649
# define isSPACE_A(c) generic_isCC_A_(c, CC_SPACE_)
16501650
# define isWORDCHAR_A(c) generic_isCC_A_(c, CC_WORDCHAR_)
16511651
# define isXDIGIT_A(c) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII
1652-
xdigits */
1652+
xdigits */
16531653
# define isIDFIRST_A(c) generic_isCC_A_(c, CC_IDFIRST_)
16541654
# define isALPHA_L1(c) generic_isCC_(c, CC_ALPHA_)
16551655
# define isALPHANUMERIC_L1(c) generic_isCC_(c, CC_ALPHANUMERIC_)
@@ -1896,7 +1896,8 @@ END_EXTERN_C
18961896
((! FITS_IN_8_BITS(c)) \
18971897
? (c) \
18981898
: PL_latin1_lc[ (U8) (c) ])
1899-
#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for consistency */
1899+
#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for
1900+
consistency */
19001901

19011902
/* Modified uc. Is correct uc except for three non-ascii chars
19021903
* which are all mapped to one of them, and these need special
@@ -2176,7 +2177,8 @@ END_EXTERN_C
21762177
#define isALPHANUMERIC_uvchr(c) generic_invlist_uvchr_(CC_ALPHANUMERIC_, c)
21772178
#define isASCII_uvchr(c) isASCII(c)
21782179
#define isBLANK_uvchr(c) generic_uvchr_(CC_BLANK_, is_HORIZWS_cp_high, c)
2179-
#define isCNTRL_uvchr(c) isCNTRL_L1(c) /* All controls are in Latin1 */
2180+
#define isCNTRL_uvchr(c) isCNTRL_L1(c) /* All controls are
2181+
in Latin1 */
21802182
#define isDIGIT_uvchr(c) generic_invlist_uvchr_(CC_DIGIT_, c)
21812183
#define isGRAPH_uvchr(c) generic_invlist_uvchr_(CC_GRAPH_, c)
21822184
#define isIDCONT_uvchr(c) \
@@ -2524,7 +2526,7 @@ END_EXTERN_C
25242526
#define isALNUM_LC_utf8(p,e) isWORDCHAR_LC_utf8(p,e)
25252527
#define isALNUM_LC_utf8_safe(p,e) isWORDCHAR_LC_utf8_safe(p,e)
25262528
#define isALNUMC_A(c) isALPHANUMERIC_A(c) /* Mnemonic: "C's
2527-
alnum" */
2529+
alnum" */
25282530
#define isALNUMC_L1(c) isALPHANUMERIC_L1(c)
25292531
#define isALNUMC(c) isALPHANUMERIC(c)
25302532
#define isALNUMC_LC(c) isALPHANUMERIC_LC(c)

Diff for: hv.h

+44-28
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ struct mro_alg {
7777
AV *(*resolve)(pTHX_ HV* stash, U32 level);
7878
const char *name;
7979
U16 length;
80-
U16 kflags; /* For the hash API - set HVhek_UTF8 if name is UTF-8 */
80+
U16 kflags; /* For the hash API - set
81+
HVhek_UTF8 if name is UTF-8 */
8182
U32 hash; /* or 0 */
8283
};
8384

@@ -89,13 +90,19 @@ struct mro_meta {
8990
value stored in and owned by mro_linear_all. */
9091
SV *mro_linear_current;
9192
HV *mro_nextmethod; /* next::method caching */
92-
U32 cache_gen; /* Bumping this invalidates our method cache */
93-
U32 pkg_gen; /* Bumps when local methods/@ISA change */
94-
const struct mro_alg *mro_which; /* which mro alg is in use? */
95-
HV *isa; /* Everything this class @ISA */
93+
U32 cache_gen; /* Bumping this invalidates
94+
our method cache */
95+
U32 pkg_gen; /* Bumps when local
96+
methods/@ISA change */
97+
const struct mro_alg *mro_which; /* which mro alg is
98+
in use? */
99+
HV *isa; /* Everything this
100+
class @ISA */
96101
HV *super; /* SUPER method cache */
97-
CV *destroy; /* DESTROY method if destroy_gen non-zero */
98-
U32 destroy_gen; /* Generation number of DESTROY cache */
102+
CV *destroy; /* DESTROY method if
103+
destroy_gen non-zero */
104+
U32 destroy_gen; /* Generation number of
105+
DESTROY cache */
99106
};
100107

101108
#define MRO_GET_PRIVATE_DATA(smeta, which) \
@@ -113,29 +120,34 @@ union _xhvnameu {
113120

114121
struct xpvhv_aux {
115122
union _xhvnameu xhv_name_u; /* name, if a symbol table */
116-
AV *xhv_backreferences; /* back references for weak references */
123+
AV *xhv_backreferences; /* back references for
124+
weak references */
117125
HE *xhv_eiter; /* current entry of iterator */
118126
I32 xhv_riter; /* current root of iterator */
119127

120-
/* Concerning xhv_name_count: When non-zero, xhv_name_u contains a pointer
121-
* to an array of HEK pointers, this being the length. The first element is
122-
* the name of the stash, which may be NULL. If xhv_name_count is positive,
123-
* then *xhv_name is one of the effective names. If xhv_name_count is nega-
124-
* tive, then xhv_name_u.xhvnameu_names[1] is the first effective name.
125-
*/
128+
/* Concerning xhv_name_count: When non-zero, xhv_name_u contains
129+
* a pointer to an array of HEK pointers, this being the length.
130+
* The first element is the name of the stash, which may be
131+
* NULL. If xhv_name_count is positive, then *xhv_name is one of
132+
* the effective names. If xhv_name_count is nega- tive, then
133+
* xhv_name_u.xhvnameu_names[1] is the first effective name.
134+
*/
126135
I32 xhv_name_count;
127136
struct mro_meta *xhv_mro_meta;
128137
#ifdef PERL_HASH_RANDOMIZE_KEYS
129-
U32 xhv_rand; /* random value for hash traversal */
130-
U32 xhv_last_rand; /* last random value for hash traversal,
131-
used to detect each() after insert
132-
for warnings */
138+
U32 xhv_rand; /* random value for hash
139+
traversal */
140+
U32 xhv_last_rand; /* last random value for hash
141+
traversal, used to detect each()
142+
after insert for warnings */
133143
#endif
134144
U32 xhv_aux_flags; /* assorted extra flags */
135145
};
136146

137-
#define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned by gv_check */
138-
#define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod) not present */
147+
#define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned
148+
by gv_check */
149+
#define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod)
150+
not present */
139151

140152
/* hash structure: */
141153
/* This structure must match the beginning of struct xpvmg in sv.h. */
@@ -150,7 +162,8 @@ struct xpvhv_with_aux {
150162
HV *xmg_stash; /* class package */
151163
union _xmgu xmg_u;
152164
STRLEN xhv_keys; /* total keys, including placeholders */
153-
STRLEN xhv_max; /* subscript of last element of xhv_array */
165+
STRLEN xhv_max; /* subscript of last element
166+
of xhv_array */
154167
struct xpvhv_aux xhv_aux;
155168
};
156169

@@ -438,16 +451,18 @@ Use this to check whether it is valid to call C<HvAUX()>.
438451

439452
#define HVhek_UTF8 0x01 /* Key is utf8 encoded. */
440453
#define HVhek_WASUTF8 0x02 /* Key is bytes here, but was
441-
supplied as utf8. */
454+
supplied as utf8. */
442455
#define HVhek_NOTSHARED 0x04 /* This key isn't a shared hash key. */
443456
/* the following flags are options for functions,
444457
they are not stored in heks */
445-
#define HVhek_FREEKEY 0x100 /* Internal flag to say key is Newx()ed. */
446-
#define HVhek_PLACEHOLD 0x200 /* Internal flag to create placeholder. (may
447-
* change, but Storable is a core module) */
458+
#define HVhek_FREEKEY 0x100 /* Internal flag to say key
459+
is Newx()ed. */
460+
#define HVhek_PLACEHOLD 0x200 /* Internal flag to create placeholder.
461+
* (may change, but Storable is a core
462+
* module) */
448463
#define HVhek_KEYCANONICAL 0x400 /* Internal flag - key is in canonical
449-
form. If the string is UTF-8, it
450-
cannot be converted to bytes. */
464+
form. If the string is UTF-8, it
465+
cannot be converted to bytes. */
451466
#define HVhek_ENABLEHVKFLAGS (HVhek_UTF8|HVhek_WASUTF8)
452467

453468
#define HEK_UTF8(hek) (HEK_FLAGS(hek) & HVhek_UTF8)
@@ -624,7 +639,8 @@ instead of a string/length pair, and no precomputed hash.
624639

625640
/* Flag bits are HVhek_UTF8, HVhek_WASUTF8, then */
626641
#define HVrhek_undef 0x00 /* Value is undef. */
627-
#define HVrhek_delete 0x10 /* Value is placeholder - signifies delete. */
642+
#define HVrhek_delete 0x10 /* Value is placeholder -
643+
signifies delete. */
628644
#define HVrhek_IV 0x20 /* Value is IV. */
629645
#define HVrhek_UV 0x30 /* Value is UV. */
630646
#define HVrhek_PV 0x40 /* Value is a (byte) string. */

0 commit comments

Comments
 (0)