perl: Fix utf8 mode not to be reseted by $unpacker->reset method

This commit is contained in:
Fuji, Goro
2010-10-06 17:52:32 +09:00
parent 4321b80999
commit 77a7d3d26a
3 changed files with 26 additions and 13 deletions

View File

@@ -443,10 +443,12 @@ XS(xs_unpacker_reset) {
}
UNPACKER(ST(0), mp);
bool const utf8 = mp->user.utf8; // save
SV* const data = template_data(mp);
SvREFCNT_dec(data);
_reset(ST(0));
mp->user.utf8 = utf8;
XSRETURN(0);
}