summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-04 13:00:45 +0000
committerGisle Aas <gisle@activestate.com>2006-01-04 13:00:45 +0000
commit1c5d1ca7ee89d1e1782f94ae9883de9a1052a87d (patch)
treed4467d134143050e200a207185eca9a7d86f74e8 /gv.c
parent396482e1e4786de2b4c8ab57cb613dc0f110b931 (diff)
downloadperl-1c5d1ca7ee89d1e1782f94ae9883de9a1052a87d.tar.gz
Get rid of a few more hardcoded string lengths.
p4raw-id: //depot/perl@26642
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gv.c b/gv.c
index d341da34d0..02ac8511a7 100644
--- a/gv.c
+++ b/gv.c
@@ -292,7 +292,7 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level)
/* UNIVERSAL methods should be callable without a stash */
if (!stash) {
level = -1; /* probably appropriate */
- if(!(stash = gv_stashpvn("UNIVERSAL", 9, FALSE)))
+ if(!(stash = gv_stashpvn(STR_WITH_LEN("UNIVERSAL"), FALSE)))
return 0;
}
@@ -375,7 +375,7 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level)
/* if at top level, try UNIVERSAL */
if (level == 0 || level == -1) {
- HV* const lastchance = gv_stashpvn("UNIVERSAL", 9, FALSE);
+ HV* const lastchance = gv_stashpvn(STR_WITH_LEN("UNIVERSAL"), FALSE);
if (lastchance) {
if ((gv = gv_fetchmeth(lastchance, name, len,
@@ -639,7 +639,7 @@ STATIC void
S_require_errno(pTHX_ GV *gv)
{
dVAR;
- HV* stash = gv_stashpvn("Errno",5,FALSE);
+ HV* stash = gv_stashpvn(STR_WITH_LEN("Errno"), FALSE);
if (!stash || !(gv_fetchmethod(stash, "TIEHASH"))) {
dSP;
@@ -650,7 +650,7 @@ S_require_errno(pTHX_ GV *gv)
newSVpvs("Errno"), Nullsv);
LEAVE;
SPAGAIN;
- stash = gv_stashpvn("Errno",5,FALSE);
+ stash = gv_stashpvn(STR_WITH_LEN("Errno"), FALSE);
if (!stash || !(gv_fetchmethod(stash, "TIEHASH")))
Perl_croak(aTHX_ "Can't use %%! because Errno.pm is not available");
}