summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryui-knk <[email protected]>2024-04-01 15:46:58 +0900
committerYuichiro Kaneko <[email protected]>2024-04-02 07:26:35 +0900
commit8066e3ea6e9462f510e5d0da887be94b18cce50b (patch)
treef11a70a88b9531a6c45a5734f7d6d5a4fcf06128
parentb25282e61844334c70def2d678c19c6105646ab3 (diff)
Remove VALUE from `struct rb_strterm_struct`
In the past, it was imemo. However a075c55 changed it. Therefore no need to use `VALUE` for the first field.
-rw-r--r--internal/parse.h4
-rw-r--r--parse.y4
2 files changed, 3 insertions, 5 deletions
diff --git a/internal/parse.h b/internal/parse.h
index fc78836e5c..d7fc6ddad4 100644
--- a/internal/parse.h
+++ b/internal/parse.h
@@ -18,8 +18,6 @@
struct rb_iseq_struct; /* in vm_core.h */
-#define STRTERM_HEREDOC IMEMO_FL_USER0
-
/* structs for managing terminator of string literal and heredocment */
typedef struct rb_strterm_literal_struct {
long nest;
@@ -40,7 +38,7 @@ typedef struct rb_strterm_heredoc_struct {
#define HERETERM_LENGTH_MAX UINT_MAX
typedef struct rb_strterm_struct {
- VALUE flags;
+ bool heredoc;
union {
rb_strterm_literal_t literal;
rb_strterm_heredoc_t heredoc;
diff --git a/parse.y b/parse.y
index 55619273b8..ddcc2746b9 100644
--- a/parse.y
+++ b/parse.y
@@ -7923,7 +7923,7 @@ parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *
static int
strterm_is_heredoc(rb_strterm_t *strterm)
{
- return strterm->flags & STRTERM_HEREDOC;
+ return strterm->heredoc;
}
static rb_strterm_t *
@@ -7940,7 +7940,7 @@ static rb_strterm_t *
new_heredoc(struct parser_params *p)
{
rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
- strterm->flags |= STRTERM_HEREDOC;
+ strterm->heredoc = true;
return strterm;
}