diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-10-06 23:58:13 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-10-06 23:58:13 +0000 |
commit | f6aff53ad72449dfefc5f6d9d303886bbb4ae545 (patch) | |
tree | cd85b258408b83f3ec2e3a02c989d3f58f4a76af | |
parent | 85581909df34d9ffca6c85cafeb2595c4cb89ffb (diff) | |
download | perl-f6aff53ad72449dfefc5f6d9d303886bbb4ae545.tar.gz |
perl 5.003_06: dump.c embed.h gv.c run.c
Restore the 5.003 gv_fullname() and gv_efullname() functions.
Provide new 3-arg forms gv_fullname3() and gv_efullname3().
-rw-r--r-- | dump.c | 10 | ||||
-rw-r--r-- | embed.h | 5 | ||||
-rw-r--r-- | gv.c | 24 | ||||
-rw-r--r-- | run.c | 2 |
4 files changed, 32 insertions, 9 deletions
@@ -67,7 +67,7 @@ GV* gv; { SV *sv = sv_newmortal(); - gv_fullname(sv, gv, Nullch); + gv_fullname3(sv, gv, Nullch); dump("\nSUB %s = ", SvPVX(sv)); if (CvXSUB(GvCV(gv))) dump("(xsub 0x%x %d)\n", @@ -85,7 +85,7 @@ GV* gv; { SV *sv = sv_newmortal(); - gv_fullname(sv, gv, Nullch); + gv_fullname3(sv, gv, Nullch); dump("\nFORMAT %s = ", SvPVX(sv)); if (CvROOT(GvFORM(gv))) dump_op(CvROOT(GvFORM(gv))); @@ -223,7 +223,7 @@ register OP *op; ENTER; tmpsv = NEWSV(0,0); SAVEFREESV(tmpsv); - gv_fullname(tmpsv, cGVOP->op_gv, Nullch); + gv_fullname3(tmpsv, cGVOP->op_gv, Nullch); dump("GV = %s\n", SvPV(tmpsv, na)); LEAVE; } @@ -309,10 +309,10 @@ register GV *gv; sv = sv_newmortal(); dumplvl++; PerlIO_printf(Perl_debug_log, "{\n"); - gv_fullname(sv, gv, Nullch); + gv_fullname3(sv, gv, Nullch); dump("GV_NAME = %s", SvPVX(sv)); if (gv != GvEGV(gv)) { - gv_efullname(sv, GvEGV(gv), Nullch); + gv_efullname3(sv, GvEGV(gv), Nullch); dump("-> %s", SvPVX(sv)); } dump("\n"); @@ -261,6 +261,7 @@ #define vtbl_isa Perl_vtbl_isa #define vtbl_isaelem Perl_vtbl_isaelem #define vtbl_mglob Perl_vtbl_mglob +#define vtbl_nkeys Perl_vtbl_nkeys #define vtbl_pack Perl_vtbl_pack #define vtbl_packelem Perl_vtbl_packelem #define vtbl_pos Perl_vtbl_pos @@ -428,11 +429,13 @@ #define gv_IOadd Perl_gv_IOadd #define gv_check Perl_gv_check #define gv_efullname Perl_gv_efullname +#define gv_efullname3 Perl_gv_efullname3 #define gv_fetchfile Perl_gv_fetchfile #define gv_fetchmeth Perl_gv_fetchmeth #define gv_fetchmethod Perl_gv_fetchmethod #define gv_fetchpv Perl_gv_fetchpv #define gv_fullname Perl_gv_fullname +#define gv_fullname3 Perl_gv_fullname3 #define gv_init Perl_gv_init #define gv_stashpv Perl_gv_stashpv #define gv_stashpvn Perl_gv_stashpvn @@ -454,6 +457,7 @@ #define hv_iternext Perl_hv_iternext #define hv_iternextsv Perl_hv_iternextsv #define hv_iterval Perl_hv_iterval +#define hv_ksplit Perl_hv_ksplit #define hv_magic Perl_hv_magic #define hv_stashpv Perl_hv_stashpv #define hv_store Perl_hv_store @@ -497,6 +501,7 @@ #define magic_setglob Perl_magic_setglob #define magic_setisa Perl_magic_setisa #define magic_setmglob Perl_magic_setmglob +#define magic_setnkeys Perl_magic_setnkeys #define magic_setpack Perl_magic_setpack #define magic_setpos Perl_magic_setpos #define magic_setsig Perl_magic_setsig @@ -687,7 +687,7 @@ I32 sv_type; } void -gv_fullname(sv, gv, prefix) +gv_fullname3(sv, gv, prefix) SV *sv; GV *gv; char *prefix; @@ -704,7 +704,7 @@ char *prefix; } void -gv_efullname(sv, gv, prefix) +gv_efullname3(sv, gv, prefix) SV *sv; GV *gv; char *prefix; @@ -712,7 +712,25 @@ char *prefix; GV *egv = GvEGV(gv); if (!egv) egv = gv; - gv_fullname(sv, egv, prefix); + gv_fullname3(sv, egv, prefix); +} + +/* XXX compatibility with versions <= 5.003. */ +void +gv_fullname(sv,gv) +SV *sv; +GV *gv; +{ + gv_fullname3(sv, gv, sv == (SV*)gv ? "*" : ""); +} + +/* XXX compatibility with versions <= 5.003. */ +void +gv_efullname(sv,gv) +SV *sv; +GV *gv; +{ + gv_efullname3(sv, gv, sv == (SV*)gv ? "*" : ""); } IO * @@ -71,7 +71,7 @@ OP *op; case OP_GV: if (cGVOP->op_gv) { sv = NEWSV(0,0); - gv_fullname(sv, cGVOP->op_gv, Nullch); + gv_fullname3(sv, cGVOP->op_gv, Nullch); PerlIO_printf(Perl_debug_log, "(%s)", SvPV(sv, na)); SvREFCNT_dec(sv); } |