diff options
author | Andy Lester <andy@petdance.com> | 2005-05-16 05:13:53 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-16 16:56:43 +0000 |
commit | a3b680e6b77dd7f88268fad8b1dbdf4f641dd836 (patch) | |
tree | 5b6dc5a60baf7a56b2db73bf0faffe0c3c44963c /universal.c | |
parent | 02a44301bf4932369de0c75ad20a9c1256a455cd (diff) | |
download | perl-a3b680e6b77dd7f88268fad8b1dbdf4f641dd836.tar.gz |
consting-eleventy.patch: More consts, plus actual bug fix
Message-ID: <20050516151353.GA25387@petdance.com>
p4raw-id: //depot/perl@24489
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/universal.c b/universal.c index c26c835e38..fd96ce73c9 100644 --- a/universal.c +++ b/universal.c @@ -137,13 +137,10 @@ for class names as well as for objects. bool Perl_sv_derived_from(pTHX_ SV *sv, const char *name) { - const char *type; - HV *stash; + const char *type = Nullch; + HV *stash = Nullhv; HV *name_stash; - stash = Nullhv; - type = Nullch; - if (SvGMAGICAL(sv)) mg_get(sv) ; @@ -348,19 +345,18 @@ XS(XS_UNIVERSAL_VERSION) } if (items > 1) { - STRLEN len; SV *req = ST(1); if (undef) { - if (pkg) - Perl_croak(aTHX_ + if (pkg) + Perl_croak(aTHX_ "%s does not define $%s::VERSION--version check failed", HvNAME(pkg), HvNAME(pkg)); - else { - const char *str = SvPVx(ST(0), len); - - Perl_croak(aTHX_ - "%s defines neither package nor VERSION--version check failed", str); + else { + STRLEN n_a; + Perl_croak(aTHX_ + "%s defines neither package nor VERSION--version check failed", + SvPVx(ST(0),n_a) ); } } |