ruby-changes:59346
From: Nobuyoshi <ko1@a...>
Date: Fri, 20 Dec 2019 23:19:14 +0900 (JST)
Subject: [ruby-changes:59346] 6876aa38f6 (master): Added `FEATURE_SET_RESTORE` macro
https://git.ruby-lang.org/ruby.git/commit/?id=6876aa38f6 From 6876aa38f607cdd6fb24910e54143d9110d025c9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 20 Dec 2019 22:50:46 +0900 Subject: Added `FEATURE_SET_RESTORE` macro diff --git a/ruby.c b/ruby.c index 60c57d6..dae928a 100644 --- a/ruby.c +++ b/ruby.c @@ -144,6 +144,7 @@ rb_feature_set_to(ruby_features_t *feat, unsigned int bit_mask, unsigned int bit https://github.com/ruby/ruby/blob/trunk/ruby.c#L144 #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 { @@ -1582,7 +1583,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt) https://github.com/ruby/ruby/blob/trunk/ruby.c#L1583 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/