From: Nicholas Clark Date: Sun, 30 Oct 2005 09:59:41 +0000 (+0000) Subject: Replace gv_fetchmethod() with a macro to call gv_fetchmethod_autoload() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=887986eb9473f45f115f0a49ec6a7899f43f8906;p=p5sagit%2Fp5-mst-13.2.git Replace gv_fetchmethod() with a macro to call gv_fetchmethod_autoload() with the extra TRUE argument. p4raw-id: //depot/perl@25893 --- diff --git a/embed.fnc b/embed.fnc index 7c0c47a..95ffb2f 100644 --- a/embed.fnc +++ b/embed.fnc @@ -263,7 +263,7 @@ Ap |void |gv_efullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|boo Ap |GV* |gv_fetchfile |NN const char* name Apd |GV* |gv_fetchmeth |NULLOK HV* stash|NN const char* name|STRLEN len|I32 level Apd |GV* |gv_fetchmeth_autoload |NULLOK HV* stash|NN const char* name|STRLEN len|I32 level -Apd |GV* |gv_fetchmethod |NULLOK HV* stash|NN const char* name +Apdmb |GV* |gv_fetchmethod |NULLOK HV* stash|NN const char* name Apd |GV* |gv_fetchmethod_autoload|NULLOK HV* stash|NN const char* name|I32 autoload Ap |GV* |gv_fetchpv |NN const char* name|I32 add|I32 sv_type Ap |void |gv_fullname |NN SV* sv|NN const GV* gv diff --git a/embed.h b/embed.h index 517900e..31085e1 100644 --- a/embed.h +++ b/embed.h @@ -253,7 +253,6 @@ #define gv_fetchfile Perl_gv_fetchfile #define gv_fetchmeth Perl_gv_fetchmeth #define gv_fetchmeth_autoload Perl_gv_fetchmeth_autoload -#define gv_fetchmethod Perl_gv_fetchmethod #define gv_fetchmethod_autoload Perl_gv_fetchmethod_autoload #define gv_fetchpv Perl_gv_fetchpv #define gv_fullname Perl_gv_fullname @@ -2244,7 +2243,6 @@ #define gv_fetchfile(a) Perl_gv_fetchfile(aTHX_ a) #define gv_fetchmeth(a,b,c,d) Perl_gv_fetchmeth(aTHX_ a,b,c,d) #define gv_fetchmeth_autoload(a,b,c,d) Perl_gv_fetchmeth_autoload(aTHX_ a,b,c,d) -#define gv_fetchmethod(a,b) Perl_gv_fetchmethod(aTHX_ a,b) #define gv_fetchmethod_autoload(a,b,c) Perl_gv_fetchmethod_autoload(aTHX_ a,b,c) #define gv_fetchpv(a,b,c) Perl_gv_fetchpv(aTHX_ a,b,c) #define gv_fullname(a,b) Perl_gv_fullname(aTHX_ a,b) diff --git a/gv.c b/gv.c index 1d950eb..0ad4c0f 100644 --- a/gv.c +++ b/gv.c @@ -397,20 +397,6 @@ Perl_gv_fetchmeth_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I32 le } /* -=for apidoc gv_fetchmethod - -See L. - -=cut -*/ - -GV * -Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name) -{ - return gv_fetchmethod_autoload(stash, name, TRUE); -} - -/* =for apidoc gv_fetchmethod_autoload Returns the glob which contains the subroutine to call to invoke the method diff --git a/gv.h b/gv.h index 87370ed..d9a5b51 100644 --- a/gv.h +++ b/gv.h @@ -160,3 +160,4 @@ Return the SV from the GV. */ #define gv_fullname3(sv,gv,prefix) gv_fullname4(sv,gv,prefix,TRUE) #define gv_efullname3(sv,gv,prefix) gv_efullname4(sv,gv,prefix,TRUE) +#define gv_fetchmethod(stash, name) gv_fetchmethod_autoload(stash, name, TRUE) diff --git a/mathoms.c b/mathoms.c index 3c92a42..ce2022e 100644 --- a/mathoms.c +++ b/mathoms.c @@ -581,6 +581,20 @@ Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix) gv_efullname4(sv, gv, prefix, TRUE); } +/* +=for apidoc gv_fetchmethod + +See L. + +=cut +*/ + +GV * +Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name) +{ + return gv_fetchmethod_autoload(stash, name, TRUE); +} + AV * Perl_av_fake(pTHX_ register I32 size, register SV **strp) { diff --git a/proto.h b/proto.h index 090f5f6..be53793 100644 --- a/proto.h +++ b/proto.h @@ -591,8 +591,8 @@ PERL_CALLCONV GV* Perl_gv_fetchmeth(pTHX_ HV* stash, const char* name, STRLEN le PERL_CALLCONV GV* Perl_gv_fetchmeth_autoload(pTHX_ HV* stash, const char* name, STRLEN len, I32 level) __attribute__nonnull__(pTHX_2); -PERL_CALLCONV GV* Perl_gv_fetchmethod(pTHX_ HV* stash, const char* name) - __attribute__nonnull__(pTHX_2); +/* PERL_CALLCONV GV* Perl_gv_fetchmethod(pTHX_ HV* stash, const char* name) + __attribute__nonnull__(pTHX_2); */ PERL_CALLCONV GV* Perl_gv_fetchmethod_autoload(pTHX_ HV* stash, const char* name, I32 autoload) __attribute__nonnull__(pTHX_2);