diff options
author | Gisle Aas <gisle@activestate.com> | 2006-01-04 12:48:34 +0000 |
---|---|---|
committer | Gisle Aas <gisle@activestate.com> | 2006-01-04 12:48:34 +0000 |
commit | 396482e1e4786de2b4c8ab57cb613dc0f110b931 (patch) | |
tree | b05f1914132e9e79579a39f57a650aff075c27af /perlio.c | |
parent | bd5fcaa6efcc067647598367721b802e1f87eaa2 (diff) | |
download | perl-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 'perlio.c')
-rw-r--r-- | perlio.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -480,7 +480,7 @@ PerlIO_debug(const char *fmt, ...) #else const char *s = CopFILE(PL_curcop); STRLEN len; - SV * const sv = newSVpvn("", 0); + SV * const sv = newSVpvs(""); Perl_sv_catpvf(aTHX_ sv, "%s:%" IVdf " ", s ? s : "(none)", (IV) CopLINE(PL_curcop)); Perl_sv_vcatpvf(aTHX_ sv, fmt, &ap); @@ -760,7 +760,7 @@ PerlIO_find_layer(pTHX_ const char *name, STRLEN len, int load) Perl_croak(aTHX_ "Recursive call to Perl_load_module in PerlIO_find_layer"); return NULL; } else { - SV * const pkgsv = newSVpvn("PerlIO", 6); + SV * const pkgsv = newSVpvs("PerlIO"); SV * const layer = newSVpvn(name, len); CV * const cv = get_cv("PerlIO::Layer::NoWarnings", FALSE); ENTER; @@ -4855,7 +4855,7 @@ int PerlIO_vprintf(PerlIO *f, const char *fmt, va_list ap) { dTHX; - SV * const sv = newSVpvn("", 0); + SV * const sv = newSVpvs(""); const char *s; STRLEN len; SSize_t wrote; @@ -4909,7 +4909,7 @@ PerlIO_tmpfile(void) f = PerlIO_fdopen(fd, "w+b"); #else /* WIN32 */ # if defined(HAS_MKSTEMP) && ! defined(VMS) && ! defined(OS2) - SV * const sv = newSVpv("/tmp/PerlIO_XXXXXX", 0); + SV * const sv = newSVpvs("/tmp/PerlIO_XXXXXX"); /* * I have no idea how portable mkstemp() is ... NI-S */ |