Change 25475 by [EMAIL PROTECTED] on 2005/09/18 21:52:25
It looks like the only way to reliably make Perl_hv_name_set a pure
macro in 5.8.x is to make it available as hv_name_set.
[Otherwise when and where aTHX_ hv gets expanded to foo, hv causes
warnings or other games when Perl_hv_name_set() is a macro]
Affected files ...
... //depot/perl/embed.fnc#242 edit
... //depot/perl/ext/Opcode/Opcode.xs#43 edit
... //depot/perl/gv.c#261 edit
... //depot/perl/hv.c#249 edit
... //depot/perl/perl.c#655 edit
... //depot/perl/proto.h#591 edit
Differences ...
==== //depot/perl/embed.fnc#242 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#241~25397~ Mon Sep 12 23:18:46 2005
+++ perl/embed.fnc Sun Sep 18 14:52:25 2005
@@ -1440,7 +1440,7 @@
ApoR |HE** |hv_eiter_p |NN HV* hv
Apo |void |hv_riter_set |NN HV* hv|I32 riter
Apo |void |hv_eiter_set |NN HV* hv|NULLOK HE* eiter
-Apo |void |hv_name_set |NN HV* hv|NULLOK const char *name|I32 len|int
flags
+Ap |void |hv_name_set |NN HV* hv|NULLOK const char *name|I32 len|int
flags
Apd |void |hv_clear_placeholders |NN HV* hb
ApoR |I32* |hv_placeholders_p |NN HV* hv
ApoR |I32 |hv_placeholders_get |NN HV* hv
==== //depot/perl/ext/Opcode/Opcode.xs#43 (text) ====
Index: perl/ext/Opcode/Opcode.xs
--- perl/ext/Opcode/Opcode.xs#42~25101~ Fri Jul 8 09:35:10 2005
+++ perl/ext/Opcode/Opcode.xs Sun Sep 18 14:52:25 2005
@@ -269,7 +269,7 @@
if (strNE(HvNAME_get(hv),"main")) {
/* make it think it's in main:: */
- Perl_hv_name_set(aTHX_ hv, "main", 4, 0);
+ hv_name_set(hv, "main", 4, 0);
hv_store(hv,"_",1,(SV *)PL_defgv,0); /* connect _ to global */
SvREFCNT_inc((SV *)PL_defgv); /* want to keep _ around! */
}
==== //depot/perl/gv.c#261 (text) ====
Index: perl/gv.c
--- perl/gv.c#260~25329~ Thu Aug 25 06:15:17 2005
+++ perl/gv.c Sun Sep 18 14:52:25 2005
@@ -669,7 +669,7 @@
GvHV(tmpgv) = newHV();
stash = GvHV(tmpgv);
if (!HvNAME_get(stash))
- Perl_hv_name_set(aTHX_ stash, name, namelen, 0);
+ hv_name_set(stash, name, namelen, 0);
return stash;
}
@@ -759,7 +759,7 @@
stash = GvHV(gv) = newHV();
if (!HvNAME_get(stash))
- Perl_hv_name_set(aTHX_ stash, nambeg, namend - nambeg, 0);
+ hv_name_set(stash, nambeg, namend - nambeg, 0);
}
if (*namend == ':')
==== //depot/perl/hv.c#249 (text) ====
Index: perl/hv.c
--- perl/hv.c#248~25335~ Tue Aug 30 02:08:31 2005
+++ perl/hv.c Sun Sep 18 14:52:25 2005
@@ -1730,7 +1730,7 @@
if ((name = HvNAME_get(hv))) {
if(PL_stashcache)
hv_delete(PL_stashcache, name, HvNAMELEN_get(hv), G_DISCARD);
- Perl_hv_name_set(aTHX_ hv, Nullch, 0, 0);
+ hv_name_set(hv, Nullch, 0, 0);
}
SvFLAGS(hv) &= ~SVf_OOK;
Safefree(HvARRAY(hv));
==== //depot/perl/perl.c#655 (text) ====
Index: perl/perl.c
--- perl/perl.c#654~25279~ Tue Aug 9 04:24:54 2005
+++ perl/perl.c Sun Sep 18 14:52:25 2005
@@ -3415,7 +3415,7 @@
SvREFCNT_dec(GvHV(gv));
GvHV(gv) = (HV*)SvREFCNT_inc(PL_defstash);
SvREADONLY_on(gv);
- Perl_hv_name_set(aTHX_ PL_defstash, "main", 4, 0);
+ hv_name_set(PL_defstash, "main", 4, 0);
PL_incgv = gv_HVadd(gv_AVadd(gv_fetchpv("INC",TRUE, SVt_PVAV)));
GvMULTI_on(PL_incgv);
PL_hintgv = gv_fetchpv("\010",TRUE, SVt_PV); /* ^H */
End of Patch.