From: Nicholas Clark Date: Sat, 27 Jan 2007 12:55:31 +0000 (+0000) Subject: Using gv_stashsv() and sv_setsv() in Perl_package reduces source and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf070237479de3d22c665ba1e87e55b6d8e595f0;p=p5sagit%2Fp5-mst-13.2.git Using gv_stashsv() and sv_setsv() in Perl_package reduces source and object code size. p4raw-id: //depot/perl@30028 --- diff --git a/op.c b/op.c index 5d78580..14f1a7d 100644 --- a/op.c +++ b/op.c @@ -3482,8 +3482,7 @@ void Perl_package(pTHX_ OP *o) { dVAR; - const char *name; - STRLEN len; + SV *const sv = cSVOPo->op_sv; #ifdef PERL_MAD OP *pegop; #endif @@ -3491,9 +3490,8 @@ Perl_package(pTHX_ OP *o) save_hptr(&PL_curstash); save_item(PL_curstname); - name = SvPV_const(cSVOPo->op_sv, len); - PL_curstash = gv_stashpvn(name, len, GV_ADD); - sv_setpvn(PL_curstname, name, len); + PL_curstash = gv_stashsv(sv, GV_ADD); + sv_setsv(PL_curstname, sv); PL_hints |= HINT_BLOCK_SCOPE; PL_copline = NOLINE;