From af73b9d11b0a8e0a0d1b6a02ee0b8213cca3867c Mon Sep 17 00:00:00 2001 From: gfx Date: Wed, 15 Sep 2010 13:22:39 +0900 Subject: [PATCH] Shortcut av_push() --- perl/xs-src/unpack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl/xs-src/unpack.c b/perl/xs-src/unpack.c index 78942233..080c4bde 100644 --- a/perl/xs-src/unpack.c +++ b/perl/xs-src/unpack.c @@ -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; }