mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
Shortcut av_push()
This commit is contained in:
parent
859969241a
commit
af73b9d11b
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
{
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue