summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2022-11-19 11:48:19 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2022-11-26 15:47:22 +0000
commitf17d9825ab9b50967fd3d8742cc1bbccec96c049 (patch)
tree1835ae9ad258f5fadd48b08c96b33887768c3352 /proto.h
parent5bd919dc87af18e1bce77d3ead83b704a2903292 (diff)
downloadperl-f17d9825ab9b50967fd3d8742cc1bbccec96c049.tar.gz
Recognise `//=` and `||=` syntax in signature parameter defaults
These create parameters where the default expression is assigned whenever the caller did not pass a defined (or true) value. I.e. both if it is missing, or is present but undef (or false).
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 0fa3538abb..11fe86c481 100644
--- a/proto.h
+++ b/proto.h
@@ -2591,6 +2591,11 @@ PERL_CALLCONV OP* Perl_newANONLIST(pTHX_ OP* o)
PERL_CALLCONV OP* Perl_newANONSUB(pTHX_ I32 floor, OP* proto, OP* block);
#define PERL_ARGS_ASSERT_NEWANONSUB
+PERL_CALLCONV OP* Perl_newARGDEFELEMOP(pTHX_ I32 flags, OP* expr, I32 argindex)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWARGDEFELEMOP \
+ assert(expr)
+
PERL_CALLCONV OP* Perl_newASSIGNOP(pTHX_ I32 flags, OP* left, I32 optype, OP* right)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_NEWASSIGNOP