Apd |void |sv_unref |NN SV* sv
Apd |void |sv_unref_flags |NN SV* sv|U32 flags
Apd |void |sv_untaint |NN SV* sv
-Apd |bool |sv_upgrade |NN SV* sv|U32 mt
+Apd |void |sv_upgrade |NN SV* sv|U32 mt
Apd |void |sv_usepvn |NN SV* sv|char* ptr|STRLEN len
Apd |void |sv_vcatpvfn |NN SV* sv|NN const char* pat|STRLEN patlen \
|va_list* args|SV** svargs|I32 svmax \
SV, then copies across as much information as possible from the old body.
You generally want to use the C<SvUPGRADE> macro wrapper. See also C<svtype>.
- bool sv_upgrade(SV* sv, U32 mt)
+ void sv_upgrade(SV* sv, U32 mt)
=for hackers
Found in file sv.c
PERL_CALLCONV void Perl_sv_untaint(pTHX_ SV* sv)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV bool Perl_sv_upgrade(pTHX_ SV* sv, U32 mt)
+PERL_CALLCONV void Perl_sv_upgrade(pTHX_ SV* sv, U32 mt)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV void Perl_sv_usepvn(pTHX_ SV* sv, char* ptr, STRLEN len)
=cut
*/
-bool
+void
Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
{
}
if (SvTYPE(sv) == mt)
- return TRUE;
+ return;
pv = NULL;
cur = 0;
SvLEN_set(sv, len);
break;
}
- return TRUE;
}
/*
#define SVTYPEMASK 0xff
#define SvTYPE(sv) ((sv)->sv_flags & SVTYPEMASK)
-#define SvUPGRADE(sv, mt) (void)(SvTYPE(sv) >= mt || sv_upgrade(sv, mt))
+#define SvUPGRADE(sv, mt) (SvTYPE(sv) >= (mt) || (sv_upgrade(sv, mt), 1))
#define SVs_PADSTALE 0x00000100 /* lexical has gone out of scope */
#define SVs_PADTMP 0x00000200 /* in use as tmp */