Skip to content

Commit 5fc9810

Browse files
committed
Shorten rb_strterm_literal_t members
1 parent a075c55 commit 5fc9810

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

internal/parse.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ struct rb_iseq_struct; /* in vm_core.h */
2323
/* structs for managing terminator of string literal and heredocment */
2424
typedef struct rb_strterm_literal_struct {
2525
long nest;
26-
long func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
27-
long paren; /* '(' of `%q(...)` */
28-
long term; /* ')' of `%q(...)` */
26+
int func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
27+
int paren; /* '(' of `%q(...)` */
28+
int term; /* ')' of `%q(...)` */
2929
} rb_strterm_literal_t;
3030

3131
typedef struct rb_strterm_heredoc_struct {

parse.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8573,9 +8573,9 @@ parser_string_term(struct parser_params *p, int func)
85738573
static enum yytokentype
85748574
parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
85758575
{
8576-
int func = (int)quote->func;
8577-
int term = (int)quote->term;
8578-
int paren = (int)quote->paren;
8576+
int func = quote->func;
8577+
int term = quote->term;
8578+
int paren = quote->paren;
85798579
int c, space = 0;
85808580
rb_encoding *enc = p->enc;
85818581
rb_encoding *base_enc = 0;

0 commit comments

Comments
 (0)