summaryrefslogtreecommitdiff
path: root/regnodes.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-11-11 21:48:53 -0700
committerKarl Williamson <khw@cpan.org>2018-11-16 09:21:35 -0700
commit46167d76640b8ae760665fc0fd2f94ac4760438c (patch)
tree5293f3d96b38ccc90f4ebd7bcd4582243273bb77 /regnodes.h
parent282634ed6aed040ba8694186b410779d98331944 (diff)
downloadperl-46167d76640b8ae760665fc0fd2f94ac4760438c.tar.gz
regcomp.sym: longj field is a boolean
The comments could lead one to thinking one could specify any of the argument fields that nodes can have. But in fact, the value is a boolean, 0 meaning to use the normal offset field of all regnodes; and 1 meaning to use the ARG field that some regnodes have. If a regnode had more than just the one argument field, the one that corresponds to that would be used. This commit enforces that, and changes regcomp.sym to not use '2', which is misleading. It clarifies the comments about this and what '.' means in the flags field
Diffstat (limited to 'regnodes.h')
-rw-r--r--regnodes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/regnodes.h b/regnodes.h
index 849d2ec494..f94b16b8e7 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -479,8 +479,8 @@ static const char reg_off_by_arg[] = {
0, /* NREFFA */
1, /* LONGJMP */
1, /* BRANCHJ */
- 2, /* IFMATCH */
- 2, /* UNLESSM */
+ 1, /* IFMATCH */
+ 1, /* UNLESSM */
1, /* SUSPEND */
1, /* IFTHEN */
0, /* GROUPP */