perl: oops. this doens't needed.

This commit is contained in:
Tokuhiro Matsuno 2009-04-15 23:14:56 +09:00
parent 0b3db48976
commit 62231983d7

View File

@ -71,7 +71,6 @@ static void _msgpack_pack_sv(enc_t *enc, SV* val) {
case SVt_PVNV: case SVt_PVNV:
{ {
STRLEN len = 0; STRLEN len = 0;
need(enc, 1);
char *pv = SvPV(val, len); char *pv = SvPV(val, len);
if (len == 1 && *pv == '1') { if (len == 1 && *pv == '1') {
msgpack_pack_true(enc); msgpack_pack_true(enc);
@ -98,7 +97,6 @@ static void _msgpack_pack_sv(enc_t *enc, SV* val) {
AV* ary = (AV*)val; AV* ary = (AV*)val;
int len = av_len(ary) + 1; int len = av_len(ary) + 1;
int i; int i;
need(enc, 1);
msgpack_pack_array(enc, len); msgpack_pack_array(enc, len);
for (i=0; i<len; i++) { for (i=0; i<len; i++) {
SV** svp = av_fetch(ary, i, 0); SV** svp = av_fetch(ary, i, 0);
@ -116,7 +114,6 @@ static void _msgpack_pack_sv(enc_t *enc, SV* val) {
int count = hv_iterinit(hval); int count = hv_iterinit(hval);
HE* he; HE* he;
need(enc, 1);
msgpack_pack_map(enc, count); msgpack_pack_map(enc, count);
while (he = hv_iternext(hval)) { while (he = hv_iternext(hval)) {