Skip to content

Commit

Permalink
Added FEATURE_SET_RESTORE macro
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 20, 2019
1 parent 1fea3a7 commit 6876aa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ruby.c
Expand Up @@ -144,6 +144,7 @@ rb_feature_set_to(ruby_features_t *feat, unsigned int bit_mask, unsigned int bit
#define FEATURE_SET_TO(feat, bit_mask, bit_set) \
rb_feature_set_to(&(feat), bit_mask, bit_set)
#define FEATURE_SET(feat, bits) FEATURE_SET_TO(feat, bits, bits)
#define FEATURE_SET_RESTORE(feat, save) FEATURE_SET_TO(feat, (save).mask, (save).set & (save).mask)
#define FEATURE_SET_P(feat, bits) ((feat).set & (bits))

struct ruby_cmdline_options {
Expand Down Expand Up @@ -1582,7 +1583,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
opt->ext.enc.name = ext_enc_name;
if (int_enc_name)
opt->intern.enc.name = int_enc_name;
FEATURE_SET_TO(opt->features, feat.mask, feat.set & feat.mask);
FEATURE_SET_RESTORE(opt->features, feat);
}

if (opt->src.enc.name)
Expand Down

0 comments on commit 6876aa3

Please sign in to comment.