mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
Tweaks for unpacker
This commit is contained in:
parent
0e0a2aa981
commit
1de03fbe18
@ -198,7 +198,10 @@ STATIC_INLINE int template_callback_raw(unpack_user* u PERL_UNUSED_DECL, const c
|
|||||||
|
|
||||||
#define UNPACKER(from, name) \
|
#define UNPACKER(from, name) \
|
||||||
msgpack_unpack_t *name; \
|
msgpack_unpack_t *name; \
|
||||||
name = INT2PTR(msgpack_unpack_t*, SvROK((from)) ? SvIV(SvRV((from))) : SvIV((from))); \
|
if(!(SvROK(from) && SvIOK(SvRV(from)))) { \
|
||||||
|
Perl_croak(aTHX_ "Invalid unpacker instance for " #name); \
|
||||||
|
} \
|
||||||
|
name = INT2PTR(msgpack_unpack_t*, SvIVX(SvRV((from)))); \
|
||||||
if(name == NULL) { \
|
if(name == NULL) { \
|
||||||
Perl_croak(aTHX_ "NULL found for " # name " when shouldn't be."); \
|
Perl_croak(aTHX_ "NULL found for " # name " when shouldn't be."); \
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user