This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add missing LEAVE to universal.c sv_does
authorGerard Goossen <gerard@ggoossen.net>
Thu, 12 Nov 2009 13:36:44 +0000 (14:36 +0100)
committerRafael Garcia-Suarez <rgs@consttype.org>
Thu, 12 Nov 2009 15:25:37 +0000 (16:25 +0100)
universal.c

index 4da6fc5..941587d 100644 (file)
@@ -172,8 +172,10 @@ Perl_sv_does(pTHX_ SV *sv, const char *const name)
     SvGETMAGIC(sv);
 
     if (!SvOK(sv) || !(SvROK(sv) || (SvPOK(sv) && SvCUR(sv))
-               || (SvGMAGICAL(sv) && SvPOKp(sv) && SvCUR(sv))))
+           || (SvGMAGICAL(sv) && SvPOKp(sv) && SvCUR(sv)))) {
+       LEAVE;
        return FALSE;
+    }
 
     if (sv_isobject(sv)) {
        classname = sv_reftype(SvRV(sv),TRUE);
@@ -181,8 +183,10 @@ Perl_sv_does(pTHX_ SV *sv, const char *const name)
        classname = SvPV_nolen(sv);
     }
 
-    if (strEQ(name,classname))
+    if (strEQ(name,classname)) {
+       LEAVE;
        return TRUE;
+    }
 
     PUSHMARK(SP);
     XPUSHs(sv);