hax/newUNOP_CUSTOM.c.inc

filter: Statementstmt 100% 4 / 4 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 4 / 4 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« lib/Syntax/Keyword/Assert.xs ↑ Summary
1 /* Before perl 5.22 under -DDEBUGGING, various new*OP() functions throw assert
2 * failures on OP_CUSTOM.
3 * https://rt.cpan.org/Ticket/Display.html?id=128562
4 */
5  
6 #define newUNOP_CUSTOM(func, flags, first) S_newUNOP_CUSTOM(aTHX_ func, flags, first)
7 59 static OP *S_newUNOP_CUSTOM(pTHX_ OP *(*func)(pTHX), U32 flags, OP *first)
8 {
9 UNOP *unop;
10 #if HAVE_PERL_VERSION(5,22,0)
11 59 unop = (UNOP *)newUNOP(OP_CUSTOM, flags, first);
12 #else
13 NewOp(1101, unop, 1, UNOP);
14 unop->op_type = (OPCODE)OP_CUSTOM;
15 unop->op_first = first;
16 unop->op_flags = (U8)(flags | OPf_KIDS);
17 unop->op_private = (U8)(1 | (flags >> 8));
18 #endif
19 59 unop->op_ppaddr = func;
20 59 return (OP *)unop;
21 }
22  
« lib/Syntax/Keyword/Assert.xs ↑ Summary