diff options
author | Tony Cook <tony@develop-help.com> | 2016-01-19 11:42:21 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-02-08 14:52:57 +1100 |
commit | 000814da477053c7627c7ace5ca3ce3d4c4aad08 (patch) | |
tree | 1ff6de6590b4c2c21edd39ab6bb98ece030c2246 /sv.c | |
parent | f05081b8ef229712c83a6f19b217489cf5e5ab25 (diff) | |
download | perl-000814da477053c7627c7ace5ca3ce3d4c4aad08.tar.gz |
[perl #124387] call AUTOLOAD when DESTROY isn't defined
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6776,6 +6776,7 @@ S_curse(pTHX_ SV * const sv, const bool check_refcnt) { if (HvNAME(stash)) { CV* destructor = NULL; struct mro_meta *meta; + assert (SvOOK(stash)); DEBUG_o( Perl_deb(aTHX_ "Looking for DESTROY method for %s\n", @@ -6791,7 +6792,7 @@ S_curse(pTHX_ SV * const sv, const bool check_refcnt) { } else { GV * const gv = - gv_fetchmeth_autoload(stash, "DESTROY", 7, 0); + gv_fetchmethod_pvn_flags(stash, "DESTROY", 7, GV_AUTOLOAD); if (gv) destructor = GvCV(gv); meta->destroy_gen = PL_sub_generation; meta->destroy = destructor; |