Change 34627 by [EMAIL PROTECTED] on 2008/10/28 21:12:09
Consting in S_find_uninit_var() and the routines that it calls.
Affected files ...
... //depot/perl/embed.fnc#625 edit
... //depot/perl/proto.h#960 edit
... //depot/perl/sv.c#1562 edit
Differences ...
==== //depot/perl/embed.fnc#625 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#624~34618~ 2008-10-28 11:29:36.000000000 -0700
+++ perl/embed.fnc 2008-10-28 14:12:09.000000000 -0700
@@ -1567,8 +1567,9 @@
s |void |not_a_number |NN SV *const sv
s |I32 |visit |NN SVFUNC_t f|const U32 flags|const U32 mask
s |void |sv_del_backref |NN SV *const tsv|NN SV *const sv
-sR |SV * |varname |NULLOK GV *gv|const char gvtype|PADOFFSET targ
\
- |NULLOK SV *keyname|I32 aindex|int
subscript_type
+sR |SV * |varname |NULLOK const GV *const gv|const char gvtype \
+ |PADOFFSET targ|NULLOK const SV *const keyname \
+ |I32 aindex|int subscript_type
# ifdef DEBUGGING
s |void |del_sv |NN SV *p
# endif
@@ -1803,9 +1804,12 @@
p |SV* |magic_scalarpack|NN HV *hv|NN MAGIC *mg
#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
-s |SV * |find_hash_subscript|NULLOK HV *hv|NN SV *val
-s |I32 |find_array_subscript|NULLOK AV *av|NN SV *val
-sMd |SV* |find_uninit_var|NULLOK OP* obase|NULLOK SV* uninit_sv|bool top
+s |SV * |find_hash_subscript|NULLOK const HV *const hv \
+ |NN const SV *const val
+s |I32 |find_array_subscript|NULLOK const AV *const av \
+ |NN const SV *const val
+sMd |SV* |find_uninit_var|NULLOK const OP *const obase \
+ |NULLOK const SV *const uninit_sv|bool top
#endif
#ifdef PERL_NEED_MY_HTOLE16
==== //depot/perl/proto.h#960 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#959~34618~ 2008-10-28 11:29:36.000000000 -0700
+++ perl/proto.h 2008-10-28 14:12:09.000000000 -0700
@@ -5552,7 +5552,7 @@
#define PERL_ARGS_ASSERT_SV_DEL_BACKREF \
assert(tsv); assert(sv)
-STATIC SV * S_varname(pTHX_ GV *gv, const char gvtype, PADOFFSET targ, SV
*keyname, I32 aindex, int subscript_type)
+STATIC SV * S_varname(pTHX_ const GV *const gv, const char gvtype,
PADOFFSET targ, const SV *const keyname, I32 aindex, int subscript_type)
__attribute__warn_unused_result__;
# ifdef DEBUGGING
@@ -6209,17 +6209,17 @@
#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
-STATIC SV * S_find_hash_subscript(pTHX_ HV *hv, SV *val)
+STATIC SV * S_find_hash_subscript(pTHX_ const HV *const hv, const SV *const
val)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_FIND_HASH_SUBSCRIPT \
assert(val)
-STATIC I32 S_find_array_subscript(pTHX_ AV *av, SV *val)
+STATIC I32 S_find_array_subscript(pTHX_ const AV *const av, const SV
*const val)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_FIND_ARRAY_SUBSCRIPT \
assert(val)
-STATIC SV* S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool top);
+STATIC SV* S_find_uninit_var(pTHX_ const OP *const obase, const SV *const
uninit_sv, bool top);
#endif
#ifdef PERL_NEED_MY_HTOLE16
==== //depot/perl/sv.c#1562 (text) ====
Index: perl/sv.c
--- perl/sv.c#1561~34626~ 2008-10-28 13:56:50.000000000 -0700
+++ perl/sv.c 2008-10-28 14:12:09.000000000 -0700
@@ -12289,7 +12289,7 @@
* If so, return a mortal copy of the key. */
STATIC SV*
-S_find_hash_subscript(pTHX_ HV *hv, SV* val)
+S_find_hash_subscript(pTHX_ const HV *const hv, const SV *const val)
{
dVAR;
register HE **array;
@@ -12325,7 +12325,7 @@
* If so, return the index, otherwise return -1. */
STATIC I32
-S_find_array_subscript(pTHX_ AV *av, SV* val)
+S_find_array_subscript(pTHX_ const AV *const av, const SV *const val)
{
dVAR;
@@ -12358,8 +12358,8 @@
#define FUV_SUBSCRIPT_WITHIN 4 /* "within @foo" */
STATIC SV*
-S_varname(pTHX_ GV *gv, const char gvtype, PADOFFSET targ,
- SV* keyname, I32 aindex, int subscript_type)
+S_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ,
+ const SV *const keyname, I32 aindex, int subscript_type)
{
SV * const name = sv_newmortal();
@@ -12434,13 +12434,13 @@
*/
STATIC SV *
-S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool match)
+S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv,
+ bool match)
{
dVAR;
SV *sv;
- AV *av;
- GV *gv;
- OP *o, *o2, *kid;
+ const GV *gv;
+ const OP *o, *o2, *kid;
if (!obase || (match && (!uninit_sv || uninit_sv == &PL_sv_undef ||
uninit_sv == &PL_sv_placeholder)))
@@ -12511,7 +12511,7 @@
if (obase->op_flags & OPf_SPECIAL) { /* lexical array */
if (match) {
SV **svp;
- av = (AV*)PAD_SV(obase->op_targ);
+ AV *av = (AV*)PAD_SV(obase->op_targ);
if (!av || SvRMAGICAL(av))
break;
svp = av_fetch(av, (I32)obase->op_private, FALSE);
@@ -12527,7 +12527,7 @@
break;
if (match) {
SV **svp;
- av = GvAV(gv);
+ AV *const av = GvAV(gv);
if (!av || SvRMAGICAL(av))
break;
svp = av_fetch(av, (I32)obase->op_private, FALSE);
End of Patch.