mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
Shortcut av_push()
This commit is contained in:
parent
859969241a
commit
af73b9d11b
@ -166,7 +166,8 @@ STATIC_INLINE int template_callback_array(unpack_user* u PERL_UNUSED_DECL, unsig
|
|||||||
STATIC_INLINE int template_callback_array_item(unpack_user* u PERL_UNUSED_DECL, SV** c, SV* o)
|
STATIC_INLINE int template_callback_array_item(unpack_user* u PERL_UNUSED_DECL, SV** c, SV* o)
|
||||||
{
|
{
|
||||||
dTHX;
|
dTHX;
|
||||||
av_push((AV*)SvRV(*c), o);
|
AV* const a = (AV*)SvRV(*c);
|
||||||
|
(void)av_store(a, AvFILLp(a) + 1, o); // the same as av_push(a, o)
|
||||||
SvREFCNT_inc_simple_void_NN(o);
|
SvREFCNT_inc_simple_void_NN(o);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user