From f17d9825ab9b50967fd3d8742cc1bbccec96c049 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Sat, 19 Nov 2022 11:48:19 +0000 Subject: 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). --- proto.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'proto.h') 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 -- cgit v1.2.1