summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-22 23:16:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-23 10:55:49 +0900
commit842a4cb915e7feba6f390ad66106aaa53ed929cf (patch)
treed68f78746952f37c3ec76514d64c1e27e08e1eb8 /marshal.c
parente0c6e8c64ac3d7cf05a40acacb36dc60924af897 (diff)
downloadruby-842a4cb915e7feba6f390ad66106aaa53ed929cf.tar.gz
Turned to_be_skipped_id to an inline function
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index ab0e63c701..054af9e0db 100644
--- a/marshal.c
+++ b/marshal.c
@@ -573,7 +573,14 @@ w_uclass(VALUE obj, VALUE super, struct dump_arg *arg)
}
}
-#define to_be_skipped_id(id) (id == rb_id_encoding() || id == s_encoding_short || id == s_ruby2_keywords_flag || !rb_id2str(id))
+static inline bool
+to_be_skipped_id(const ID id)
+{
+ if (id == s_encoding_short) return true;
+ if (id == s_ruby2_keywords_flag) return true;
+ if (id == rb_id_encoding()) return true;
+ return !rb_id2str(id);
+}
struct w_ivar_arg {
struct dump_call_arg *dump;