ext/XS-APItest/t/addissub.t test op check wrapping
ext/XS-APItest/t/arrayexpr.t test recursive descent expression parsing
ext/XS-APItest/t/autoload.t Test XS AUTOLOAD routines
+ext/XS-APItest/t/av.t Test AV functions
ext/XS-APItest/t/BHK.pm Helper for ./blockhooks.t
ext/XS-APItest/t/blockasexpr.t test recursive descent block parsing
ext/XS-APItest/t/blockhooks-csc.t XS::APItest: more tests for PL_blockhooks
ApdR |AV* |av_make |SSize_t size|NN SV **strp
Apd |SV* |av_pop |NN AV *av
ApdoxM |void |av_create_and_push|NN AV **const avp|NN SV *const val
-Apd |void |av_push |NN AV *av|NN SV *val
+Apd |void |av_push |NN AV *av|NULLOK SV *val
: Used in scope.c, and by Data::Alias
EXp |void |av_reify |NN AV *av
ApdR |SV* |av_shift |NN AV *av
CODE:
av_store(av, ix, SvREFCNT_inc(sv));
+void
+av_pushnull(AV *av)
+ CODE:
+ av_push(av, NULL);
+
MODULE = XS::APItest PACKAGE = XS::APItest::AUTOLOADtest
int
--- /dev/null
+#!perl
+
+use Test::More tests => 4;
+use XS::APItest;
+
+av_pushnull \@_;
+is $#_, 0, '$#_ after av_push(@_, NULL)';
+ok !exists $_[0], '!exists $_[0] after av_push(@_,NULL)';
+
+use Tie::Array;
+tie @tied, 'Tie::StdArray';
+av_pushnull \@tied;
+is $#tied, 0, '$#tied after av_push(@tied, NULL)';
+is $tied[0], undef, '$tied[0] is undef after av_push(@tied,NULL)';
assert(av)
PERL_CALLCONV void Perl_av_push(pTHX_ AV *av, SV *val)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2);
+ __attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_AV_PUSH \
- assert(av); assert(val)
+ assert(av)
PERL_CALLCONV void Perl_av_reify(pTHX_ AV *av)
__attribute__nonnull__(pTHX_1);