Skip to content

Commit 52c7eb6

Browse files
committed
WS Cleanup Stage #9 - reformat structs
1 parent 6bf0828 commit 52c7eb6

File tree

16 files changed

+785
-785
lines changed

16 files changed

+785
-785
lines changed

av.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
*/
1010

1111
struct xpvav {
12-
HV* xmg_stash; /* class package */
12+
HV *xmg_stash; /* class package */
1313
union _xmgu xmg_u;
1414
SSize_t xav_fill; /* Index of last element present */
1515
SSize_t xav_max; /* max index for which array has space */
16-
SV** xav_alloc; /* pointer to beginning of C array of SVs */
16+
SV **xav_alloc; /* pointer to beginning of C array of SVs */
1717
};
1818

1919
/* SV* xav_arylen; */

cop.h

Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
*/
3232

3333
struct jmpenv {
34-
struct jmpenv * je_prev;
35-
Sigjmp_buf je_buf; /* uninit if je_prev is NULL */
36-
int je_ret; /* last exception thrown */
37-
bool je_mustcatch; /* longjmp()s must be caught locally */
38-
U16 je_old_delaymagic; /* saved PL_delaymagic */
39-
SSize_t je_old_stack_hwm;
34+
struct jmpenv *je_prev;
35+
Sigjmp_buf je_buf; /* uninit if je_prev is NULL */
36+
int je_ret; /* last exception thrown */
37+
bool je_mustcatch; /* longjmp()s must be caught locally */
38+
U16 je_old_delaymagic; /* saved PL_delaymagic */
39+
SSize_t je_old_stack_hwm;
4040
};
4141

4242
typedef struct jmpenv JMPENV;
@@ -427,29 +427,29 @@ struct cop {
427427
BASEOP
428428
/* On LP64 putting this here takes advantage of the fact that BASEOP isn't
429429
an exact multiple of 8 bytes to save structure padding. */
430-
line_t cop_line; /* line # of this command */
430+
line_t cop_line; /* line # of this command */
431431
/* label for this construct is now stored in cop_hints_hash */
432432
#ifdef USE_ITHREADS
433-
PADOFFSET cop_stashoff; /* offset into PL_stashpad, for the package
434-
the line was compiled in */
435-
char * cop_file; /* rcpv containing name of file
436-
this command is from */
433+
PADOFFSET cop_stashoff; /* offset into PL_stashpad, for the package
434+
the line was compiled in */
435+
char *cop_file; /* rcpv containing name of file
436+
this command is from */
437437
#else
438-
HV * cop_stash; /* package line was compiled in */
439-
GV * cop_filegv; /* name of GV file this command is from */
438+
HV *cop_stash; /* package line was compiled in */
439+
GV *cop_filegv; /* name of GV file this command is from */
440440
#endif
441-
U32 cop_hints; /* hints bits from pragmata */
442-
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
448-
RCPV_LEN() macro to get its length.
449-
*/
441+
U32 cop_hints; /* hints bits from pragmata */
442+
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
448+
RCPV_LEN() macro to get its length.
449+
*/
450450
/* compile time state of %^H. See the comment in op.c for how
451451
this is used to recreate a hash to return from caller. */
452-
COPHH * cop_hints_hash;
452+
COPHH *cop_hints_hash;
453453
/* for now just a bitmask stored here. If we get sufficient features
454454
this may become a pointer. How these flags are stored is subject
455455
to change without notice. Use the macros to test for features.
@@ -533,8 +533,8 @@ Returns the length of a pv created with C<rcpv_new()>.
533533
*/
534534

535535
struct rcpv {
536-
STRLEN refcount; /* UV would mean a 64 refcnt on 32 bit
537-
builds with -Duse64bitint */
536+
STRLEN refcount; /* UV would mean a 64 refcnt on 32 bit
537+
builds with -Duse64bitint */
538538
STRLEN len;
539539
char pv[1];
540540
};
@@ -792,27 +792,27 @@ returned label, by setting C<*flags> to 0 or C<SVf_UTF8>.
792792

793793
/* subroutine context */
794794
struct block_sub {
795-
OP * retop; /* op to execute on exit from sub */
796-
I32 old_cxsubix; /* previous value of si_cxsubix */
795+
OP *retop; /* op to execute on exit from sub */
796+
I32 old_cxsubix; /* previous value of si_cxsubix */
797797
/* Above here is the same for sub, format and eval. */
798-
PAD *prevcomppad; /* the caller's PL_comppad */
799-
CV * cv;
798+
PAD *prevcomppad; /* the caller's PL_comppad */
799+
CV *cv;
800800
/* Above here is the same for sub and format. */
801-
I32 olddepth;
802-
AV *savearray;
801+
I32 olddepth;
802+
AV *savearray;
803803
};
804804

805805

806806
/* format context */
807807
struct block_format {
808-
OP * retop; /* op to execute on exit from sub */
809-
I32 old_cxsubix; /* previous value of si_cxsubix */
808+
OP *retop; /* op to execute on exit from sub */
809+
I32 old_cxsubix; /* previous value of si_cxsubix */
810810
/* Above here is the same for sub, format and eval. */
811-
PAD *prevcomppad; /* the caller's PL_comppad */
812-
CV * cv;
811+
PAD *prevcomppad; /* the caller's PL_comppad */
812+
CV *cv;
813813
/* Above here is the same for sub and format. */
814-
GV * gv;
815-
GV * dfoutgv;
814+
GV *gv;
815+
GV *dfoutgv;
816816
};
817817

818818
/* return a pointer to the current context */
@@ -866,14 +866,14 @@ struct block_format {
866866

867867
/* eval context */
868868
struct block_eval {
869-
OP * retop; /* op to execute on exit from eval */
870-
I32 old_cxsubix; /* previous value of si_cxsubix */
869+
OP *retop; /* op to execute on exit from eval */
870+
I32 old_cxsubix; /* previous value of si_cxsubix */
871871
/* Above here is the same for sub, format and eval. */
872-
SV * old_namesv;
873-
OP * old_eval_root;
874-
SV * cur_text;
875-
CV * cv;
876-
JMPENV * cur_top_env; /* value of PL_top_env when eval CX created */
872+
SV *old_namesv;
873+
OP *old_eval_root;
874+
SV *cur_text;
875+
CV *cv;
876+
JMPENV *cur_top_env; /* value of PL_top_env when eval CX created */
877877
};
878878

879879
/* If we ever need more than 512 op types, change the shift from 7. blku_gimme
@@ -888,32 +888,32 @@ struct block_eval {
888888

889889
/* loop context */
890890
struct block_loop {
891-
LOOP * my_op; /* My op, that contains redo, next and last ops. */
892-
union { /* different ways of locating the iteration variable */
893-
SV **svp; /* for lexicals: address of pad slot */
894-
GV *gv; /* for package vars */
895-
} itervar_u;
896-
SV *itersave; /* the original iteration var */
891+
LOOP *my_op; /* My op, that contains redo, next and last ops. */
892+
union { /* different ways of locating the iteration variable */
893+
SV **svp; /* for lexicals: address of pad slot */
894+
GV *gv; /* for package vars */
895+
} itervar_u;
896+
SV *itersave; /* the original iteration var */
897897
union {
898898
struct { /* CXt_LOOP_ARY, C<for (@ary)> */
899-
AV *ary; /* array being iterated over */
900-
IV ix; /* index relative to base of array */
901-
} ary;
899+
AV *ary; /* array being iterated over */
900+
IV ix; /* index relative to base of array */
901+
} ary;
902902
struct { /* CXt_LOOP_LIST, C<for (list)> */
903903
I32 basesp; /* first element of list on stack */
904-
IV ix; /* index relative to basesp */
905-
} stack;
904+
IV ix; /* index relative to basesp */
905+
} stack;
906906
struct { /* CXt_LOOP_LAZYIV, C<for (1..9)> */
907-
IV cur;
908-
IV end;
909-
} lazyiv;
907+
IV cur;
908+
IV end;
909+
} lazyiv;
910910
struct { /* CXt_LOOP_LAZYSV C<for ('a'..'z')> */
911-
SV * cur;
912-
SV * end; /* maxiumum value (or minimum in reverse) */
913-
} lazysv;
914-
} state_u;
911+
SV *cur;
912+
SV *end; /* maxiumum value (or minimum in reverse) */
913+
} lazysv;
914+
} state_u;
915915
#ifdef USE_ITHREADS
916-
PAD *oldcomppad; /* needed to map itervar_u.svp during thread clone */
916+
PAD *oldcomppad; /* needed to map itervar_u.svp during thread clone */
917917
#endif
918918
};
919919

@@ -947,33 +947,33 @@ struct block_loop {
947947

948948
/* given/when context */
949949
struct block_givwhen {
950-
OP *leave_op;
951-
SV *defsv_save; /* the original $_ */
950+
OP *leave_op;
951+
SV *defsv_save; /* the original $_ */
952952
};
953953

954954

955955

956956
/* context common to subroutines, evals and loops */
957957
struct block {
958-
U8 blku_type; /* what kind of context this is */
959-
U8 blku_gimme; /* is this block running in list context? */
960-
U16 blku_u16; /* used by block_sub and block_eval (so far) */
961-
I32 blku_oldsaveix; /* saved PL_savestack_ix */
958+
U8 blku_type; /* what kind of context this is */
959+
U8 blku_gimme; /* is this block running in list context? */
960+
U16 blku_u16; /* used by block_sub and block_eval (so far) */
961+
I32 blku_oldsaveix; /* saved PL_savestack_ix */
962962
/* all the fields above must be aligned with same-sized fields as sbu */
963-
I32 blku_oldsp; /* current sp floor: where nextstate pops to */
964-
I32 blku_oldmarksp; /* mark stack index */
965-
COP * blku_oldcop; /* old curcop pointer */
966-
PMOP * blku_oldpm; /* values of pattern match vars */
967-
SSize_t blku_old_tmpsfloor; /* saved PL_tmps_floor */
968-
I32 blku_oldscopesp; /* scope stack index */
963+
I32 blku_oldsp; /* current sp floor: where nextstate pops to */
964+
I32 blku_oldmarksp; /* mark stack index */
965+
COP *blku_oldcop; /* old curcop pointer */
966+
PMOP *blku_oldpm; /* values of pattern match vars */
967+
SSize_t blku_old_tmpsfloor; /* saved PL_tmps_floor */
968+
I32 blku_oldscopesp; /* scope stack index */
969969

970970
union {
971971
struct block_sub blku_sub;
972972
struct block_format blku_format;
973973
struct block_eval blku_eval;
974974
struct block_loop blku_loop;
975975
struct block_givwhen blku_givwhen;
976-
} blk_u;
976+
} blk_u;
977977
};
978978
#define blk_oldsp cx_u.cx_blk.blku_oldsp
979979
#define blk_oldcop cx_u.cx_blk.blku_oldcop
@@ -1006,21 +1006,21 @@ struct block {
10061006

10071007
/* substitution context */
10081008
struct subst {
1009-
U8 sbu_type; /* same as blku_type */
1010-
U8 sbu_rflags;
1011-
U16 sbu_rxtainted;
1012-
I32 sbu_oldsaveix; /* same as blku_oldsaveix */
1009+
U8 sbu_type; /* same as blku_type */
1010+
U8 sbu_rflags;
1011+
U16 sbu_rxtainted;
1012+
I32 sbu_oldsaveix; /* same as blku_oldsaveix */
10131013
/* all the fields above must be aligned with same-sized fields as blk_u */
1014-
SSize_t sbu_iters;
1015-
SSize_t sbu_maxiters;
1016-
char * sbu_orig;
1017-
SV * sbu_dstr;
1018-
SV * sbu_targ;
1019-
char * sbu_s;
1020-
char * sbu_m;
1021-
char * sbu_strend;
1022-
void * sbu_rxres;
1023-
REGEXP * sbu_rx;
1014+
SSize_t sbu_iters;
1015+
SSize_t sbu_maxiters;
1016+
char *sbu_orig;
1017+
SV *sbu_dstr;
1018+
SV *sbu_targ;
1019+
char *sbu_s;
1020+
char *sbu_m;
1021+
char *sbu_strend;
1022+
void *sbu_rxres;
1023+
REGEXP *sbu_rx;
10241024
};
10251025

10261026
#ifdef PERL_CORE
@@ -1076,7 +1076,7 @@ struct context {
10761076
union {
10771077
struct block cx_blk;
10781078
struct subst cx_subst;
1079-
} cx_u;
1079+
} cx_u;
10801080
};
10811081
#define cx_type cx_u.cx_subst.sbu_type
10821082

@@ -1216,10 +1216,10 @@ struct context {
12161216
#define PERLSI_REGCOMP 11
12171217

12181218
struct stackinfo {
1219-
AV * si_stack; /* stack for current runlevel */
1220-
PERL_CONTEXT * si_cxstack; /* context stack for runlevel */
1221-
struct stackinfo * si_prev;
1222-
struct stackinfo * si_next;
1219+
AV *si_stack; /* stack for current runlevel */
1220+
PERL_CONTEXT *si_cxstack; /* context stack for runlevel */
1221+
struct stackinfo *si_prev;
1222+
struct stackinfo *si_next;
12231223
I32 si_cxix; /* current context index */
12241224
I32 si_cxmax; /* maximum allocated index */
12251225
I32 si_cxsubix; /* topmost sub/eval/format */
@@ -1229,7 +1229,7 @@ struct stackinfo {
12291229
* with DEBUGGING, but not
12301230
* #ifdef-ed for bincompat */
12311231
#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
1232-
/* high water mark: for checking if the stack was correctly
1232+
/* high water mark: for checking if the stack was correctly
12331233
* extended / tested for extension by each pp function */
12341234
SSize_t si_stack_hwm;
12351235
#endif

gv.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
*/
1111

1212
struct gp {
13-
SV * gp_sv; /* scalar value */
14-
struct io * gp_io; /* filehandle value */
15-
CV * gp_cv; /* subroutine value */
16-
U32 gp_cvgen; /* generational validity of cached gp_cv */
17-
U32 gp_refcnt; /* how many globs point to this? */
18-
HV * gp_hv; /* hash value */
19-
AV * gp_av; /* array value */
20-
CV * gp_form; /* format value */
21-
GV * gp_egv; /* effective gv, if *glob */
22-
PERL_BITFIELD32 gp_line:31; /* line first declared at (for -w) */
13+
SV *gp_sv; /* scalar value */
14+
struct io *gp_io; /* filehandle value */
15+
CV *gp_cv; /* subroutine value */
16+
U32 gp_cvgen; /* generational validity of cached gp_cv */
17+
U32 gp_refcnt; /* how many globs point to this? */
18+
HV *gp_hv; /* hash value */
19+
AV *gp_av; /* array value */
20+
CV *gp_form; /* format value */
21+
GV *gp_egv; /* effective gv, if *glob */
22+
PERL_BITFIELD32 gp_line:31; /* line first declared at (for -w) */
2323
PERL_BITFIELD32 gp_flags:1;
24-
HEK * gp_file_hek; /* file first declared in (for -w) */
24+
HEK *gp_file_hek; /* file first declared in (for -w) */
2525
};
2626

2727
#define GvXPVGV(gv) ((XPVGV*)SvANY(gv))

0 commit comments

Comments
 (0)