From ee62b5872fcaa0eebd452a940ede4d506653bd81 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 16 Aug 2012 23:44:11 -0700 Subject: [PATCH] =?utf8?q?pp=5Fctl.c:pp=5Fdbstate:=20Don=E2=80=99t=20adjus?= =?utf8?q?t=20CvDEPTH=20for=20XSUBs?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit c127bd3aaa5c5 made XS DB::DB subs work. Before that, pp_dbstate assumed DB::DB was written it perl. It adjusts CvDEPTH when calling the XSUB, which serves no purpose. It was presumably just copied from the pure-Perl-calling code. pp_entersub does- n’t do this. --- pp_ctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/pp_ctl.c b/pp_ctl.c index 55d9c89..b9b26e5 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1973,10 +1973,8 @@ PP(pp_dbstate) SPAGAIN; if (CvISXSUB(cv)) { - CvDEPTH(cv)++; PUSHMARK(SP); (void)(*CvXSUB(cv))(aTHX_ cv); - CvDEPTH(cv)--; FREETMPS; LEAVE; return NORMAL; -- 2.7.4