summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-04 12:48:34 +0000
committerGisle Aas <gisle@activestate.com>2006-01-04 12:48:34 +0000
commit396482e1e4786de2b4c8ab57cb613dc0f110b931 (patch)
treeb05f1914132e9e79579a39f57a650aff075c27af /gv.c
parentbd5fcaa6efcc067647598367721b802e1f87eaa2 (diff)
downloadperl-396482e1e4786de2b4c8ab57cb613dc0f110b931.tar.gz
Introduce the macros newSVpvs(str) and sv_catpvs(sv, str).
Gets rid of many hardcoded string lengths. p4raw-id: //depot/perl@26641
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index 06982bdd9d..d341da34d0 100644
--- a/gv.c
+++ b/gv.c
@@ -626,7 +626,7 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method)
LEAVE;
varsv = GvSVn(vargv);
sv_setpvn(varsv, packname, packname_len);
- sv_catpvn(varsv, "::", 2);
+ sv_catpvs(varsv, "::");
sv_catpvn(varsv, name, len);
SvTAINTED_off(varsv);
return gv;
@@ -647,7 +647,7 @@ S_require_errno(pTHX_ GV *gv)
ENTER;
save_scalar(gv); /* keep the value of $! */
Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT,
- newSVpvn("Errno",5), Nullsv);
+ newSVpvs("Errno"), Nullsv);
LEAVE;
SPAGAIN;
stash = gv_stashpvn("Errno",5,FALSE);
@@ -1222,7 +1222,7 @@ Perl_gv_fullname4(pTHX_ SV *sv, const GV *gv, const char *prefix, bool keepmain)
if (keepmain || strNE(name, "main")) {
sv_catpvn(sv,name,namelen);
- sv_catpvn(sv,"::", 2);
+ sv_catpvs(sv,"::");
}
sv_catpvn(sv,GvNAME(gv),GvNAMELEN(gv));
}