#define SvUPGRADE(sv, mt) (SvTYPE(sv) >= (mt) || (sv_upgrade(sv, mt), 1))
-#define SVf_IOK 0x00000100 /* has valid public integer value */
-#define SVf_NOK 0x00000200 /* has valid public numeric value */
-#define SVf_POK 0x00000400 /* has valid public pointer value */
-#define SVf_ROK 0x00000800 /* has a valid reference pointer */
-
-#define SVp_IOK 0x00001000 /* has valid non-public integer value */
-#define SVp_NOK 0x00002000 /* has valid non-public numeric value */
-#define SVp_POK 0x00004000 /* has valid non-public pointer value */
-#define SVp_SCREAM 0x00008000 /* has been studied? */
-#define SVphv_CLONEABLE 0x00008000 /* PVHV (stashes) clone its objects */
-
-#define SVs_PADSTALE 0x00010000 /* lexical has gone out of scope */
-#define SVpad_STATE 0x00010000 /* pad name is a "state" var */
-#define SVs_PADTMP 0x00020000 /* in use as tmp */
-#define SVpad_TYPED 0x00020000 /* pad name is a Typed Lexical */
-#define SVs_PADMY 0x00040000 /* in use a "my" variable */
-#define SVpad_OUR 0x00040000 /* pad name is "our" instead of "my" */
-#define SVs_TEMP 0x00080000 /* string is stealable? */
-#define SVs_OBJECT 0x00100000 /* is "blessed" */
-#define SVs_GMG 0x00200000 /* has magical get method */
-#define SVs_SMG 0x00400000 /* has magical set method */
-#define SVs_RMG 0x00800000 /* has random magical methods */
-
-#define SVf_FAKE 0x01000000 /* 0: glob or lexical is just a copy
- 1: SV head arena wasn't malloc()ed
- 2: in conjunction with SVf_READONLY
- marks a shared hash key scalar
- (SvLEN == 0) or a copy on write
- string (SvLEN != 0) [SvIsCOW(sv)]
- 3: For PVCV, whether CvUNIQUE(cv)
- refers to an eval or once only
- [CvEVAL(cv), CvSPECIAL(cv)]
- 4: Whether the regexp pointer is in
- fact an offset [SvREPADTMP(sv)]
- 5: On a pad name SV, that slot in the
- frame AV is a REFCNT'ed reference
- to a lexical from "outside". */
-#define SVphv_REHASH SVf_FAKE /* 6: On a PVHV, hash values are being
- recalculated */
-#define SVf_OOK 0x02000000 /* has valid offset value
- For a PVHV this means that a
- hv_aux struct is present after the
- main array */
-#define SVf_BREAK 0x04000000 /* refcnt is artificially low - used
- * by SV's in final arena cleanup */
-#define SVf_READONLY 0x08000000 /* may not be modified */
+#define SVf_IOK 0x00000100 /* has valid public integer value */
+#define SVf_NOK 0x00000200 /* has valid public numeric value */
+#define SVf_POK 0x00000400 /* has valid public pointer value */
+#define SVf_ROK 0x00000800 /* has a valid reference pointer */
+
+#define SVp_IOK 0x00001000 /* has valid non-public integer value */
+#define SVp_NOK 0x00002000 /* has valid non-public numeric value */
+#define SVp_POK 0x00004000 /* has valid non-public pointer value */
+#define SVp_SCREAM 0x00008000 /* has been studied? */
+#define SVphv_CLONEABLE 0x00008000 /* PVHV (stashes) clone its objects */
+
+#define SVs_PADSTALE 0x00010000 /* lexical has gone out of scope */
+#define SVpad_STATE 0x00010000 /* pad name is a "state" var */
+#define SVs_PADTMP 0x00020000 /* in use as tmp */
+#define SVpad_TYPED 0x00020000 /* pad name is a Typed Lexical */
+#define SVs_PADMY 0x00040000 /* in use a "my" variable */
+#define SVpad_OUR 0x00040000 /* pad name is "our" instead of "my" */
+#define SVs_TEMP 0x00080000 /* string is stealable? */
+#define SVs_OBJECT 0x00100000 /* is "blessed" */
+#define SVs_GMG 0x00200000 /* has magical get method */
+#define SVs_SMG 0x00400000 /* has magical set method */
+#define SVs_RMG 0x00800000 /* has random magical methods */
+
+#define SVf_FAKE 0x01000000 /* 0: glob or lexical is just a copy
+ 1: SV head arena wasn't malloc()ed
+ 2: in conjunction with SVf_READONLY
+ marks a shared hash key scalar
+ (SvLEN == 0) or a copy on write
+ string (SvLEN != 0) [SvIsCOW(sv)]
+ 3: For PVCV, whether CvUNIQUE(cv)
+ refers to an eval or once only
+ [CvEVAL(cv), CvSPECIAL(cv)]
+ 4: Whether the regexp pointer is in
+ fact an offset [SvREPADTMP(sv)]
+ 5: On a pad name SV, that slot in the
+ frame AV is a REFCNT'ed reference
+ to a lexical from "outside". */
+#define SVphv_REHASH SVf_FAKE /* 6: On a PVHV, hash values are being
+ recalculated */
+#define SVf_OOK 0x02000000 /* has valid offset value. For a PVHV this
+ means that a hv_aux struct is present
+ after the main array */
+#define SVf_BREAK 0x04000000 /* refcnt is artificially low - used by
+ SV's in final arena cleanup */
+#define SVf_READONLY 0x08000000 /* may not be modified */
/* Some private flags. */
/* PVHV */
-#define SVphv_SHAREKEYS 0x20000000 /* PVHV
- keys live on shared string table */
+#define SVphv_SHAREKEYS 0x20000000 /* PVHV keys live on shared string table */
/* PVNV, PVMG, presumably only inside pads */
-#define SVpad_NAME 0x40000000 /* This SV is a name in the PAD, so
- SVpad_TYPED, SVpad_OUR and
- SVpad_STATE apply */
+#define SVpad_NAME 0x40000000 /* This SV is a name in the PAD, so
+ SVpad_TYPED, SVpad_OUR and SVpad_STATE
+ apply */
/* PVAV */
-#define SVpav_REAL 0x40000000 /* free old entries */
+#define SVpav_REAL 0x40000000 /* free old entries */
/* PVHV */
-#define SVphv_LAZYDEL 0x40000000 /* entry in xhv_eiter must be deleted */
+#define SVphv_LAZYDEL 0x40000000 /* entry in xhv_eiter must be deleted */
/* This is only set true on a PVGV when it's playing "PVBM", but is tested for
on any regular scalar (anything <= PVLV) */
#define SVpbm_VALID 0x40000000
/* ??? */
-#define SVrepl_EVAL 0x40000000 /* Replacement part of s///e */
+#define SVrepl_EVAL 0x40000000 /* Replacement part of s///e */
/* IV, PVIV, PVNV, PVMG, PVGV and (I assume) PVLV */
/* Presumably IVs aren't stored in pads */
-#define SVf_IVisUV 0x80000000 /* use XPVUV instead of XPVIV */
+#define SVf_IVisUV 0x80000000 /* use XPVUV instead of XPVIV */
/* PVAV */
-#define SVpav_REIFY 0x80000000 /* can become real */
+#define SVpav_REIFY 0x80000000 /* can become real */
/* PVHV */
-#define SVphv_HASKFLAGS 0x80000000 /* keys have flag byte after hash */
+#define SVphv_HASKFLAGS 0x80000000 /* keys have flag byte after hash */
/* PVFM */
-#define SVpfm_COMPILED 0x80000000 /* FORMLINE is compiled */
+#define SVpfm_COMPILED 0x80000000 /* FORMLINE is compiled */
/* PVGV when SVpbm_VALID is true */
#define SVpbm_TAIL 0x80000000
/* RV upwards. However, SVf_ROK and SVp_IOK are exclusive */
-#define SVprv_WEAKREF 0x80000000 /* Weak reference */
+#define SVprv_WEAKREF 0x80000000 /* Weak reference */
struct xpv {