From: Nicholas Clark Date: Wed, 8 Jun 2005 08:04:53 +0000 (+0000) Subject: More SvPV consting X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd367867636c3c5c363c15be0f203f36e4df99b0;p=p5sagit%2Fp5-mst-13.2.git More SvPV consting p4raw-id: //depot/perl@24746 --- diff --git a/perly.act b/perly.act index 877fa07..0011ecf 100644 --- a/perly.act +++ b/perly.act @@ -329,7 +329,7 @@ case 2: case 61: #line 341 "perly.y" - { STRLEN n_a; char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv,n_a); + { STRLEN n_a; const char *name = SvPV_const(((SVOP*)yyvsp[0].opval)->op_sv,n_a); if (strEQ(name, "BEGIN") || strEQ(name, "END") || strEQ(name, "INIT") || strEQ(name, "CHECK")) CvSPECIAL_on(PL_compcv); diff --git a/perly.y b/perly.y index 308176f..16ba650 100644 --- a/perly.y +++ b/perly.y @@ -338,7 +338,7 @@ startformsub: /* NULL */ /* start a format subroutine scope */ ; /* Name of a subroutine - must be a bareword, could be special */ -subname : WORD { STRLEN n_a; char *name = SvPV(((SVOP*)$1)->op_sv,n_a); +subname : WORD { STRLEN n_a; const char *name = SvPV_const(((SVOP*)$1)->op_sv,n_a); if (strEQ(name, "BEGIN") || strEQ(name, "END") || strEQ(name, "INIT") || strEQ(name, "CHECK")) CvSPECIAL_on(PL_compcv);