(SvTYPE(obj) == SVt_PVGV &&
(GvSV(obj) == sv || GvHV(obj) == (HV*)sv || GvAV(obj) == (AV*)sv ||
GvCV(obj) == (CV*)sv || GvIOp(obj) == (IO*)sv ||
- GvFORM(obj) == (CV*)sv)))
+ GvFORM(obj) == (CV*)sv)) ||
+ (how == PERL_MAGIC_tiedscalar &&
+ SvROK(obj) && (SvRV(obj) == sv || GvIO(SvRV(obj)) == (IO*)sv)))
{
mg->mg_obj = obj;
}
len = tmplen;
}
if (!hash)
- PERL_HASH(hash, src, len);
+ PERL_HASH(hash, (U8*)src, len);
new_SV(sv);
sv_upgrade(sv, SVt_PVIV);
SvPVX(sv) = sharepvn(src, is_utf8?-len:len, hash);