Skip to content

Commit fa801ee

Browse files
committed
WS Cleanup Stage #8 - reformat structs
1 parent b2de5b4 commit fa801ee

16 files changed

+756
-756
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: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
*/
3131

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

4141
typedef struct jmpenv JMPENV;
@@ -434,23 +434,23 @@ struct cop {
434434
BASEOP
435435
/* On LP64 putting this here takes advantage of the fact that BASEOP isn't
436436
an exact multiple of 8 bytes to save structure padding. */
437-
line_t cop_line; /* line # of this command */
437+
line_t cop_line; /* line # of this command */
438438
/* label for this construct is now stored in cop_hints_hash */
439439
#ifdef USE_ITHREADS
440-
PADOFFSET cop_stashoff; /* offset into PL_stashpad, for the
441-
package the line was compiled in */
442-
char * cop_file; /* name of file this command is from */
440+
PADOFFSET cop_stashoff; /* offset into PL_stashpad, for the
441+
package the line was compiled in */
442+
char *cop_file; /* name of file this command is from */
443443
#else
444-
HV * cop_stash; /* package line was compiled in */
445-
GV * cop_filegv; /* name of GV file this command is from */
444+
HV *cop_stash; /* package line was compiled in */
445+
GV *cop_filegv; /* name of GV file this command is from */
446446
#endif
447-
U32 cop_hints; /* hints bits from pragmata */
448-
U32 cop_seq; /* parse sequence number */
447+
U32 cop_hints; /* hints bits from pragmata */
448+
U32 cop_seq; /* parse sequence number */
449449
/* Beware. mg.c and warnings.pl assume the type of this is STRLEN *: */
450-
STRLEN * cop_warnings; /* lexical warnings bitmask */
450+
STRLEN *cop_warnings; /* lexical warnings bitmask */
451451
/* compile time state of %^H. See the comment in op.c for how this is
452452
used to recreate a hash to return from caller. */
453-
COPHH * cop_hints_hash;
453+
COPHH *cop_hints_hash;
454454
/* for now just a bitmask stored here.
455455
If we get sufficient features this may become a pointer.
456456
How these flags are stored is subject to change without
@@ -708,27 +708,27 @@ by setting C<*flags> to 0 or C<SVf_UTF8>.
708708

709709
/* subroutine context */
710710
struct block_sub {
711-
OP * retop; /* op to execute on exit from sub */
712-
I32 old_cxsubix; /* previous value of si_cxsubix */
711+
OP *retop; /* op to execute on exit from sub */
712+
I32 old_cxsubix; /* previous value of si_cxsubix */
713713
/* Above here is the same for sub, format and eval. */
714-
PAD *prevcomppad; /* the caller's PL_comppad */
715-
CV * cv;
714+
PAD *prevcomppad; /* the caller's PL_comppad */
715+
CV *cv;
716716
/* Above here is the same for sub and format. */
717-
I32 olddepth;
718-
AV *savearray;
717+
I32 olddepth;
718+
AV *savearray;
719719
};
720720

721721

722722
/* format context */
723723
struct block_format {
724-
OP * retop; /* op to execute on exit from sub */
725-
I32 old_cxsubix; /* previous value of si_cxsubix */
724+
OP *retop; /* op to execute on exit from sub */
725+
I32 old_cxsubix; /* previous value of si_cxsubix */
726726
/* Above here is the same for sub, format and eval. */
727-
PAD *prevcomppad; /* the caller's PL_comppad */
728-
CV * cv;
727+
PAD *prevcomppad; /* the caller's PL_comppad */
728+
CV *cv;
729729
/* Above here is the same for sub and format. */
730-
GV * gv;
731-
GV * dfoutgv;
730+
GV *gv;
731+
GV *dfoutgv;
732732
};
733733

734734
/* return a pointer to the current context */
@@ -782,14 +782,14 @@ struct block_format {
782782

783783
/* eval context */
784784
struct block_eval {
785-
OP * retop; /* op to execute on exit from eval */
786-
I32 old_cxsubix; /* previous value of si_cxsubix */
785+
OP *retop; /* op to execute on exit from eval */
786+
I32 old_cxsubix; /* previous value of si_cxsubix */
787787
/* Above here is the same for sub, format and eval. */
788-
SV * old_namesv;
789-
OP * old_eval_root;
790-
SV * cur_text;
791-
CV * cv;
792-
JMPENV * cur_top_env; /* value of PL_top_env when eval CX created */
788+
SV *old_namesv;
789+
OP *old_eval_root;
790+
SV *cur_text;
791+
CV *cv;
792+
JMPENV *cur_top_env; /* value of PL_top_env when eval CX created */
793793
};
794794

795795
/* If we ever need more than 512 op types, change the shift from 7.
@@ -804,32 +804,32 @@ struct block_eval {
804804

805805
/* loop context */
806806
struct block_loop {
807-
LOOP * my_op; /* My op, that contains redo, next and last ops. */
808-
union { /* different ways of locating the iteration variable */
809-
SV **svp; /* for lexicals: address of pad slot */
810-
GV *gv; /* for package vars */
811-
} itervar_u;
812-
SV *itersave; /* the original iteration var */
807+
LOOP *my_op; /* My op, that contains redo, next and last ops. */
808+
union { /* different ways of locating the iteration variable */
809+
SV **svp; /* for lexicals: address of pad slot */
810+
GV *gv; /* for package vars */
811+
} itervar_u;
812+
SV *itersave; /* the original iteration var */
813813
union {
814814
struct { /* CXt_LOOP_ARY, C<for (@ary)> */
815-
AV *ary; /* array being iterated over */
816-
IV ix; /* index relative to base of array */
817-
} ary;
815+
AV *ary; /* array being iterated over */
816+
IV ix; /* index relative to base of array */
817+
} ary;
818818
struct { /* CXt_LOOP_LIST, C<for (list)> */
819819
I32 basesp; /* first element of list on stack */
820-
IV ix; /* index relative to basesp */
821-
} stack;
820+
IV ix; /* index relative to basesp */
821+
} stack;
822822
struct { /* CXt_LOOP_LAZYIV, C<for (1..9)> */
823-
IV cur;
824-
IV end;
825-
} lazyiv;
823+
IV cur;
824+
IV end;
825+
} lazyiv;
826826
struct { /* CXt_LOOP_LAZYSV C<for ('a'..'z')> */
827-
SV * cur;
828-
SV * end; /* maxiumum value (or minimum in reverse) */
829-
} lazysv;
830-
} state_u;
827+
SV *cur;
828+
SV *end; /* maxiumum value (or minimum in reverse) */
829+
} lazysv;
830+
} state_u;
831831
#ifdef USE_ITHREADS
832-
PAD *oldcomppad; /* needed to map itervar_u.svp during thread clone */
832+
PAD *oldcomppad; /* needed to map itervar_u.svp during thread clone */
833833
#endif
834834
};
835835

@@ -863,33 +863,33 @@ struct block_loop {
863863

864864
/* given/when context */
865865
struct block_givwhen {
866-
OP *leave_op;
867-
SV *defsv_save; /* the original $_ */
866+
OP *leave_op;
867+
SV *defsv_save; /* the original $_ */
868868
};
869869

870870

871871

872872
/* context common to subroutines, evals and loops */
873873
struct block {
874-
U8 blku_type; /* what kind of context this is */
875-
U8 blku_gimme; /* is this block running in list context? */
876-
U16 blku_u16; /* used by block_sub and block_eval (so far) */
877-
I32 blku_oldsaveix; /* saved PL_savestack_ix */
874+
U8 blku_type; /* what kind of context this is */
875+
U8 blku_gimme; /* is this block running in list context? */
876+
U16 blku_u16; /* used by block_sub and block_eval (so far) */
877+
I32 blku_oldsaveix; /* saved PL_savestack_ix */
878878
/* all the fields above must be aligned with same-sized fields as sbu */
879-
I32 blku_oldsp; /* current sp floor: where nextstate pops to */
880-
I32 blku_oldmarksp; /* mark stack index */
881-
COP * blku_oldcop; /* old curcop pointer */
882-
PMOP * blku_oldpm; /* values of pattern match vars */
883-
SSize_t blku_old_tmpsfloor; /* saved PL_tmps_floor */
884-
I32 blku_oldscopesp; /* scope stack index */
879+
I32 blku_oldsp; /* current sp floor: where nextstate pops to */
880+
I32 blku_oldmarksp; /* mark stack index */
881+
COP *blku_oldcop; /* old curcop pointer */
882+
PMOP *blku_oldpm; /* values of pattern match vars */
883+
SSize_t blku_old_tmpsfloor; /* saved PL_tmps_floor */
884+
I32 blku_oldscopesp; /* scope stack index */
885885

886886
union {
887887
struct block_sub blku_sub;
888888
struct block_format blku_format;
889889
struct block_eval blku_eval;
890890
struct block_loop blku_loop;
891891
struct block_givwhen blku_givwhen;
892-
} blk_u;
892+
} blk_u;
893893
};
894894
#define blk_oldsp cx_u.cx_blk.blku_oldsp
895895
#define blk_oldcop cx_u.cx_blk.blku_oldcop
@@ -922,21 +922,21 @@ struct block {
922922

923923
/* substitution context */
924924
struct subst {
925-
U8 sbu_type; /* same as blku_type */
926-
U8 sbu_rflags;
927-
U16 sbu_rxtainted;
928-
I32 sbu_oldsaveix; /* same as blku_oldsaveix */
925+
U8 sbu_type; /* same as blku_type */
926+
U8 sbu_rflags;
927+
U16 sbu_rxtainted;
928+
I32 sbu_oldsaveix; /* same as blku_oldsaveix */
929929
/* all the fields above must be aligned with same-sized fields as blk_u */
930-
SSize_t sbu_iters;
931-
SSize_t sbu_maxiters;
932-
char * sbu_orig;
933-
SV * sbu_dstr;
934-
SV * sbu_targ;
935-
char * sbu_s;
936-
char * sbu_m;
937-
char * sbu_strend;
938-
void * sbu_rxres;
939-
REGEXP * sbu_rx;
930+
SSize_t sbu_iters;
931+
SSize_t sbu_maxiters;
932+
char *sbu_orig;
933+
SV *sbu_dstr;
934+
SV *sbu_targ;
935+
char *sbu_s;
936+
char *sbu_m;
937+
char *sbu_strend;
938+
void *sbu_rxres;
939+
REGEXP *sbu_rx;
940940
};
941941

942942
#ifdef PERL_CORE
@@ -992,7 +992,7 @@ struct context {
992992
union {
993993
struct block cx_blk;
994994
struct subst cx_subst;
995-
} cx_u;
995+
} cx_u;
996996
};
997997
#define cx_type cx_u.cx_subst.sbu_type
998998

@@ -1132,10 +1132,10 @@ struct context {
11321132
#define PERLSI_REGCOMP 11
11331133

11341134
struct stackinfo {
1135-
AV * si_stack; /* stack for current runlevel */
1136-
PERL_CONTEXT * si_cxstack; /* context stack for runlevel */
1137-
struct stackinfo * si_prev;
1138-
struct stackinfo * si_next;
1135+
AV *si_stack; /* stack for current runlevel */
1136+
PERL_CONTEXT *si_cxstack; /* context stack for runlevel */
1137+
struct stackinfo *si_prev;
1138+
struct stackinfo *si_next;
11391139
I32 si_cxix; /* current context index */
11401140
I32 si_cxmax; /* maximum allocated index */
11411141
I32 si_cxsubix; /* topmost sub/eval/format */
@@ -1144,7 +1144,7 @@ struct stackinfo {
11441144
* currently used only with DEBUGGING,
11451145
* but not #ifdef-ed for bincompat */
11461146
#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
1147-
/* high water mark: for checking if the stack was correctly extended /
1147+
/* high water mark: for checking if the stack was correctly extended /
11481148
* tested for extension by each pp function */
11491149
SSize_t si_stack_hwm;
11501150
#endif

gv.h

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

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

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

0 commit comments

Comments
 (0)