diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-04-17 12:47:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-04-17 12:47:39 +0000 |
commit | eff494dd14cc5afe1a584bb7e0000a62b81acc19 (patch) | |
tree | d8fe8284ac63f47c43d9d4126f903c54e64f778c | |
parent | 37698ac13e6c088d690d4d7ee5635c83f340f956 (diff) | |
download | perl-eff494dd14cc5afe1a584bb7e0000a62b81acc19.tar.gz |
Perl_gv_fetchmethod{,_autoload,_flags} are actually never* called with
a non-NULL stash. So change the parameter to NN.
* Fixed the one really obscure hitherto untested case.
p4raw-id: //depot/perl@33706
-rw-r--r-- | embed.fnc | 7 | ||||
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | pp_sys.c | 2 | ||||
-rw-r--r-- | proto.h | 9 |
4 files changed, 12 insertions, 8 deletions
@@ -297,9 +297,10 @@ Ap |GV* |gv_fetchfile_flags|NN const char *const name|const STRLEN len\ |const U32 flags 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 -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 -ApdM |GV* |gv_fetchmethod_flags|NULLOK HV* stash|NN const char* name \ +Apdmb |GV* |gv_fetchmethod |NN HV* stash|NN const char* name +Apd |GV* |gv_fetchmethod_autoload|NN HV* stash|NN const char* name \ + |I32 autoload +ApdM |GV* |gv_fetchmethod_flags|NN HV* stash|NN const char* name \ |U32 flags Ap |GV* |gv_fetchpv |NN const char *nambeg|I32 add|const svtype sv_type Ap |void |gv_fullname |NN SV* sv|NN const GV* gv @@ -622,7 +622,7 @@ Perl_gv_fetchmethod_flags(pTHX_ HV *stash, const char *name, U32 flags) PERL_ARGS_ASSERT_GV_FETCHMETHOD_AUTOLOAD; - if (stash && SvTYPE(stash) < SVt_PVHV) + if (SvTYPE(stash) < SVt_PVHV) stash = NULL; for (nend = name; *nend; nend++) { @@ -942,7 +942,7 @@ PP(pp_dbmopen) PUTBACK; require_pv("AnyDBM_File.pm"); SPAGAIN; - if (!(gv = gv_fetchmethod(stash, "TIEHASH"))) + if (!stash || !(gv = gv_fetchmethod(stash, "TIEHASH"))) DIE(aTHX_ "No dbm on this machine"); } @@ -894,19 +894,22 @@ PERL_CALLCONV GV* Perl_gv_fetchmeth_autoload(pTHX_ HV* stash, const char* name, assert(name) /* PERL_CALLCONV GV* Perl_gv_fetchmethod(pTHX_ HV* stash, const char* name) + __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); */ #define PERL_ARGS_ASSERT_GV_FETCHMETHOD \ - assert(name) + assert(stash); assert(name) PERL_CALLCONV GV* Perl_gv_fetchmethod_autoload(pTHX_ HV* stash, const char* name, I32 autoload) + __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_GV_FETCHMETHOD_AUTOLOAD \ - assert(name) + assert(stash); assert(name) PERL_CALLCONV GV* Perl_gv_fetchmethod_flags(pTHX_ HV* stash, const char* name, U32 flags) + __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_GV_FETCHMETHOD_FLAGS \ - assert(name) + assert(stash); assert(name) PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, const svtype sv_type) __attribute__nonnull__(pTHX_1); |