From: Nicholas Clark Date: Wed, 26 Nov 2008 20:29:58 +0000 (+0000) Subject: Exactly 1 function, in perl.c, calls Perl_magicname(), so inline it. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1f4e14d11aa03d2274b4d16575cf47b35f529bfa;p=p5sagit%2Fp5-mst-13.2.git Exactly 1 function, in perl.c, calls Perl_magicname(), so inline it. p4raw-id: //depot/perl@34927 --- diff --git a/embed.fnc b/embed.fnc index e061031..033096d 100644 --- a/embed.fnc +++ b/embed.fnc @@ -513,7 +513,6 @@ p |int |magic_setutf8 |NN SV* sv|NN MAGIC* mg p |int |magic_set_all_env|NN SV* sv|NN MAGIC* mg p |U32 |magic_sizepack |NN SV* sv|NN MAGIC* mg p |int |magic_wipepack |NN SV* sv|NN MAGIC* mg -p |void |magicname |NN const char* sym|NULLOK const char* name|I32 namlen Ap |void |markstack_grow #if defined(USE_LOCALE_COLLATE) p |int |magic_setcollxfrm|NN SV* sv|NN MAGIC* mg diff --git a/embed.h b/embed.h index 2c39f1b..d3f45e6 100644 --- a/embed.h +++ b/embed.h @@ -475,7 +475,6 @@ #define magic_set_all_env Perl_magic_set_all_env #define magic_sizepack Perl_magic_sizepack #define magic_wipepack Perl_magic_wipepack -#define magicname Perl_magicname #endif #define markstack_grow Perl_markstack_grow #if defined(USE_LOCALE_COLLATE) @@ -2812,7 +2811,6 @@ #define magic_set_all_env(a,b) Perl_magic_set_all_env(aTHX_ a,b) #define magic_sizepack(a,b) Perl_magic_sizepack(aTHX_ a,b) #define magic_wipepack(a,b) Perl_magic_wipepack(aTHX_ a,b) -#define magicname(a,b,c) Perl_magicname(aTHX_ a,b,c) #endif #define markstack_grow() Perl_markstack_grow(aTHX) #if defined(USE_LOCALE_COLLATE) diff --git a/perl.c b/perl.c index a4710e6..f485345 100644 --- a/perl.c +++ b/perl.c @@ -2892,17 +2892,6 @@ Perl_require_pv(pTHX_ const char *pv) POPSTACK; } -void -Perl_magicname(pTHX_ const char *sym, const char *name, I32 namlen) -{ - register GV * const gv = gv_fetchpv(sym, GV_ADD, SVt_PV); - - PERL_ARGS_ASSERT_MAGICNAME; - - if (gv) - sv_magic(GvSV(gv), MUTABLE_SV(gv), PERL_MAGIC_sv, name, namlen); -} - STATIC void S_usage(pTHX_ const char *name) /* XXX move this out into a module ? */ { @@ -4654,7 +4643,11 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register sv_setpv(GvSV(tmpgv),MacPerl_MPWFileName(PL_origfilename)); #else sv_setpv(GvSV(tmpgv),PL_origfilename); - magicname("0", "0", 1); + { + GV * const gv = gv_fetchpv("0", GV_ADD, SVt_PV); + if (gv) + sv_magic(GvSV(gv), MUTABLE_SV(gv), PERL_MAGIC_sv, "0", 1); + } #endif } if ((PL_envgv = gv_fetchpvs("ENV", GV_ADD|GV_NOTQUAL, SVt_PVHV))) { diff --git a/proto.h b/proto.h index 4d5c83e..1517baa 100644 --- a/proto.h +++ b/proto.h @@ -1796,11 +1796,6 @@ PERL_CALLCONV int Perl_magic_wipepack(pTHX_ SV* sv, MAGIC* mg) #define PERL_ARGS_ASSERT_MAGIC_WIPEPACK \ assert(sv); assert(mg) -PERL_CALLCONV void Perl_magicname(pTHX_ const char* sym, const char* name, I32 namlen) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_MAGICNAME \ - assert(sym) - PERL_CALLCONV void Perl_markstack_grow(pTHX); #if defined(USE_LOCALE_COLLATE) PERL_CALLCONV int Perl_magic_setcollxfrm(pTHX_ SV* sv, MAGIC* mg)