summaryrefslogtreecommitdiff
path: root/universal.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 /universal.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 'universal.c')
-rw-r--r--universal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/universal.c b/universal.c
index 5c147b675a..fe76f815b9 100644
--- a/universal.c
+++ b/universal.c
@@ -549,7 +549,7 @@ XS(XS_version_boolean)
SP -= items;
if (sv_derived_from(ST(0), "version")) {
SV * const lobj = SvRV(ST(0));
- SV * const rs = newSViv( vcmp(lobj,new_version(newSVpvn("0",1))) );
+ SV * const rs = newSViv( vcmp(lobj,new_version(newSVpvs("0"))) );
PUSHs(sv_2mortal(rs));
PUTBACK;
return;
@@ -900,7 +900,7 @@ XS(XS_PerlIO_get_layers)
const IV flags = SvIVX(*flgsvp);
if (flags & PERLIO_F_UTF8) {
- XPUSHs(newSVpvn("utf8", 4));
+ XPUSHs(newSVpvs("utf8"));
nitem++;
}
}