diff options
author | Karl Williamson <khw@cpan.org> | 2014-09-16 17:16:47 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-09-29 11:07:39 -0600 |
commit | 9990d5ab621b83dea3adb80c343aff125fe9764b (patch) | |
tree | 853129d0e9d992ca9ae29f030bef10d507af689b /regcomp.h | |
parent | 975a06f7f899d1dd89d8a66defc0b3ee41013d1f (diff) | |
download | perl-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.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |