mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
check SvROK first
This commit is contained in:
parent
3397d261d8
commit
b45dc8db61
1 changed files with 3 additions and 3 deletions
|
|
@ -141,6 +141,9 @@ static void _msgpack_pack_sv(enc_t *enc, SV* val) {
|
|||
if (val==NULL) {
|
||||
msgpack_pack_nil(enc);
|
||||
return;
|
||||
} else if (SvROK(val)) {
|
||||
_msgpack_pack_sv(enc, SvRV(val));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (SvTYPE(val)) {
|
||||
|
|
@ -200,9 +203,6 @@ static void _msgpack_pack_sv(enc_t *enc, SV* val) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SVt_RV:
|
||||
_msgpack_pack_sv(enc, SvRV(val));
|
||||
break;
|
||||
default:
|
||||
if (SvPOKp(val)) {
|
||||
STRLEN len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue