diff options
Diffstat (limited to 'ext/B/B.xs')
-rw-r--r-- | ext/B/B.xs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs index ec9e578020..25d69e97bd 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -648,13 +648,19 @@ B::OP LOGOP_other(o) B::LOGOP o -#define LISTOP_children(o) o->op_children - MODULE = B PACKAGE = B::LISTOP PREFIX = LISTOP_ U32 LISTOP_children(o) B::LISTOP o + OP * kid = NO_INIT + int i = NO_INIT + CODE: + ST(0) = sv_newmortal(); + i = 0; + for (kid = o->op_first; kid; kid = kid->op_sibling) + i++; + sv_setiv(ST(0), i); #define PMOP_pmreplroot(o) o->op_pmreplroot #define PMOP_pmreplstart(o) o->op_pmreplstart |