summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-09-16 17:16:47 -0600
committerKarl Williamson <khw@cpan.org>2014-09-29 11:07:39 -0600
commit9990d5ab621b83dea3adb80c343aff125fe9764b (patch)
tree853129d0e9d992ca9ae29f030bef10d507af689b /regcomp.h
parent975a06f7f899d1dd89d8a66defc0b3ee41013d1f (diff)
downloadperl-9990d5ab621b83dea3adb80c343aff125fe9764b.tar.gz
regcomp.c: Add a function and use it
This adds a function to allocate a regnode with 2 32-bit arguments, and uses it, rather than the ad-hoc code that did the same thing previously. This is in preparation for this code being used in a 2nd place in a future commit.
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/regcomp.h b/regcomp.h
index 9b59d020f0..c08e5ad56c 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -361,6 +361,13 @@ struct regnode_ssc {
(ptr)->type = op; (ptr)->next_off = 0; (ptr)++; } STMT_END
#define FILL_ADVANCE_NODE_ARG(ptr, op, arg) STMT_START { \
ARG_SET(ptr, arg); FILL_ADVANCE_NODE(ptr, op); (ptr) += 1; } STMT_END
+#define FILL_ADVANCE_NODE_2L_ARG(ptr, op, arg1, arg2) \
+ STMT_START { \
+ ARG_SET(ptr, arg1); \
+ ARG2L_SET(ptr, arg2); \
+ FILL_ADVANCE_NODE(ptr, op); \
+ (ptr) += 2; \
+ } STMT_END
#define REG_MAGIC 0234