@@ -77,7 +77,8 @@ struct mro_alg {
77
77
AV * (* resolve )(pTHX_ HV * stash , U32 level );
78
78
const char * name ;
79
79
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 */
81
82
U32 hash ; /* or 0 */
82
83
};
83
84
@@ -89,13 +90,19 @@ struct mro_meta {
89
90
value stored in and owned by mro_linear_all. */
90
91
SV * mro_linear_current ;
91
92
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 */
96
101
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 */
99
106
};
100
107
101
108
#define MRO_GET_PRIVATE_DATA (smeta , which ) \
@@ -113,29 +120,34 @@ union _xhvnameu {
113
120
114
121
struct xpvhv_aux {
115
122
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 */
117
125
HE * xhv_eiter ; /* current entry of iterator */
118
126
I32 xhv_riter ; /* current root of iterator */
119
127
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
+ */
126
135
I32 xhv_name_count ;
127
136
struct mro_meta * xhv_mro_meta ;
128
137
#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 */
133
143
#endif
134
144
U32 xhv_aux_flags ; /* assorted extra flags */
135
145
};
136
146
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 */
139
151
140
152
/* hash structure: */
141
153
/* This structure must match the beginning of struct xpvmg in sv.h. */
@@ -150,7 +162,8 @@ struct xpvhv_with_aux {
150
162
HV * xmg_stash ; /* class package */
151
163
union _xmgu xmg_u ;
152
164
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 */
154
167
struct xpvhv_aux xhv_aux ;
155
168
};
156
169
@@ -438,16 +451,18 @@ Use this to check whether it is valid to call C<HvAUX()>.
438
451
439
452
#define HVhek_UTF8 0x01 /* Key is utf8 encoded. */
440
453
#define HVhek_WASUTF8 0x02 /* Key is bytes here, but was
441
- supplied as utf8. */
454
+ supplied as utf8. */
442
455
#define HVhek_NOTSHARED 0x04 /* This key isn't a shared hash key. */
443
456
/* the following flags are options for functions,
444
457
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) */
448
463
#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. */
451
466
#define HVhek_ENABLEHVKFLAGS (HVhek_UTF8|HVhek_WASUTF8)
452
467
453
468
#define HEK_UTF8 (hek ) (HEK_FLAGS(hek) & HVhek_UTF8)
@@ -624,7 +639,8 @@ instead of a string/length pair, and no precomputed hash.
624
639
625
640
/* Flag bits are HVhek_UTF8, HVhek_WASUTF8, then */
626
641
#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. */
628
644
#define HVrhek_IV 0x20 /* Value is IV. */
629
645
#define HVrhek_UV 0x30 /* Value is UV. */
630
646
#define HVrhek_PV 0x40 /* Value is a (byte) string. */
0 commit comments