summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c2
-rw-r--r--pad.c4
-rw-r--r--pad.h8
3 files changed, 6 insertions, 8 deletions
diff --git a/op.c b/op.c
index 8aca413e11..814c5e26eb 100644
--- a/op.c
+++ b/op.c
@@ -3818,7 +3818,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right)
* that value, we know we've got commonality. We could use a
* single bit marker, but then we'd have to make 2 passes, first
* to clear the flag, then to test and set it. To find somewhere
- * to store these values, evil chicanery is done with SvCUR().
+ * to store these values, evil chicanery is done with SvUVX().
*/
{
diff --git a/pad.c b/pad.c
index 67913b0854..cae1c02988 100644
--- a/pad.c
+++ b/pad.c
@@ -76,7 +76,7 @@ xlow+1..xhigh inclusive in the NV union is a range of cop_seq numbers for
which the name is valid. For typed lexicals name SV is SVt_PVMG and SvSTASH
points at the type. For C<our> lexicals, the type is also SVt_PVMG, with the
OURSTASH slot pointing at the stash of the associated global (so that
-duplicate C<our> declarations in the same package can be detected). SvCUR is
+duplicate C<our> declarations in the same package can be detected). SvUVX is
sometimes hijacked to store the generation number during compilation.
If SvFAKE is set on the name SV, then that slot in the frame AV is
@@ -417,8 +417,6 @@ for a slot which has no name and no active value.
/* And flag whether the incoming name is UTF8 or 8 bit?
Could do this either with the +ve/-ve hack of the HV code, or expanding
the flag bits. Either way, this makes proper Unicode safe pad support.
- Also could change the sv structure to make the NV a union with 2 U32s,
- so that SvCUR() could stop being overloaded in pad SVs.
NWC
*/
diff --git a/pad.h b/pad.h
index 44e9385494..6e06955fb0 100644
--- a/pad.h
+++ b/pad.h
@@ -276,11 +276,11 @@ Assumes the slot entry is a valid C<our> lexical.
=for apidoc m|STRLEN|PAD_COMPNAME_GEN|PADOFFSET po
The generation number of the name at offset C<po> in the current
-compiling pad (lvalue). Note that C<SvCUR> is hijacked for this purpose.
+compiling pad (lvalue). Note that C<SvUVX> is hijacked for this purpose.
=for apidoc m|STRLEN|PAD_COMPNAME_GEN_set|PADOFFSET po|int gen
Sets the generation number of the name at offset C<po> in the current
-ling pad (lvalue) to C<gen>. Note that C<SvCUR_set> is hijacked for this purpose.
+ling pad (lvalue) to C<gen>. Note that C<SvUV_set> is hijacked for this purpose.
=cut
@@ -296,9 +296,9 @@ ling pad (lvalue) to C<gen>. Note that C<SvCUR_set> is hijacked for this purpos
#define PAD_COMPNAME_OURSTASH(po) \
(OURSTASH(*av_fetch(PL_comppad_name, (po), FALSE)))
-#define PAD_COMPNAME_GEN(po) SvCUR(AvARRAY(PL_comppad_name)[po])
+#define PAD_COMPNAME_GEN(po) ((STRLEN)SvUVX(AvARRAY(PL_comppad_name)[po]))
-#define PAD_COMPNAME_GEN_set(po, gen) SvCUR_set(AvARRAY(PL_comppad_name)[po], gen)
+#define PAD_COMPNAME_GEN_set(po, gen) SvUV_set(AvARRAY(PL_comppad_name)[po], (UV)(gen))
/*