diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-11-17 13:51:01 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-11-17 13:51:01 +0000 |
commit | bfc44f79c8382df2655da380f044c9068132d2ec (patch) | |
tree | 1bb6d0756e58fa249838b7277d53415ccfd8b88a /sv.c | |
parent | 3bf5301d49e7bde9d101d2b6a61d860441624c9a (diff) | |
download | perl-bfc44f79c8382df2655da380f044c9068132d2ec.tar.gz |
s/SvTYPE(sv)/old_type/ in sv_upgrade because we already have that value
in that variable.
Don't compile S_new_body with -DPURIFY
p4raw-id: //depot/perl@26146
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1161,6 +1161,11 @@ S_more_bodies (pTHX_ size_t size, svtype sv_type) /* now use the inline version in the proper function */ +#ifndef PURIFY + +/* This isn't being used with -DPURIFY, so don't declare it. Otherwise + compilers issue warnings. */ + STATIC void * S_new_body(pTHX_ size_t size, svtype sv_type) { @@ -1169,6 +1174,8 @@ S_new_body(pTHX_ size_t size, svtype sv_type) return xpv; } +#endif + /* return a thing to the free list */ #define del_body(thing, root) \ @@ -1397,12 +1404,12 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt) sv_force_normal_flags(sv, 0); } - if (SvTYPE(sv) == mt) + if (old_type == mt) return; - if (SvTYPE(sv) > mt) + if (old_type > mt) Perl_croak(aTHX_ "sv_upgrade from type %d down to type %d", - (int)SvTYPE(sv), (int)mt); + (int)old_type, (int)mt); old_body = SvANY(sv); @@ -1448,7 +1455,7 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt) So we are careful and work out the size of used parts of all the structures. */ - switch (SvTYPE(sv)) { + switch (old_type) { case SVt_NULL: break; case SVt_IV: |