summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-01-29 18:28:16 +0000
committerNicholas Clark <nick@ccl4.org>2007-01-29 18:28:16 +0000
commit29a861e74521a5f903bccb023c86950d733fa0b7 (patch)
tree30399e656738dc7add2288fa2aebd589eeaaf041 /proto.h
parente30fbb82116d47ef2569f2af20359965dc7fcae1 (diff)
downloadperl-29a861e74521a5f903bccb023c86950d733fa0b7.tar.gz
Add av_create_and_push() and av_create_and_unshift_one() to refactor
out two repeated idioms. p4raw-id: //depot/perl@30064
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index f9bcc51e35..0272b80021 100644
--- a/proto.h
+++ b/proto.h
@@ -158,6 +158,10 @@ PERL_CALLCONV AV* Perl_av_make(pTHX_ I32 size, SV** svp)
PERL_CALLCONV SV* Perl_av_pop(pTHX_ AV* ar)
__attribute__nonnull__(pTHX_1);
+PERL_CALLCONV void Perl_av_create_and_push(pTHX_ AV **const avp, SV *const val)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+
PERL_CALLCONV void Perl_av_push(pTHX_ AV* ar, SV* val)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
@@ -175,6 +179,10 @@ PERL_CALLCONV SV** Perl_av_store(pTHX_ AV* ar, I32 key, SV* val)
PERL_CALLCONV void Perl_av_undef(pTHX_ AV* ar)
__attribute__nonnull__(pTHX_1);
+PERL_CALLCONV SV** Perl_av_create_and_unshift_one(pTHX_ AV **const avp, SV *const val)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+
PERL_CALLCONV void Perl_av_unshift(pTHX_ AV* ar, I32 num)
__attribute__nonnull__(pTHX_1);