summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-25 12:38:26 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-25 12:38:26 (GMT)
commit2c1aa2caabdfedb1eaef3d3d1ed4e1ee656a7706 (patch)
treef39d8fd8c89af887d2da1b3d167afa95726bc707 /marshal.c
parent460152ea73f7eb55449329e77b141d50f8cabe01 (diff)
marshal.c: use STATIC_ASSERT
* marshal.c (MARSHAL_INFECTION): check size by STATIC_ASSERT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 997a720..1294fad 100644
--- a/marshal.c
+++ b/marshal.c
@@ -148,7 +148,7 @@ rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE),
}
#define MARSHAL_INFECTION FL_TAINT
-typedef char ruby_check_marshal_viral_flags[MARSHAL_INFECTION == (int)MARSHAL_INFECTION ? 1 : -1];
+STATIC_ASSERT(marshal_infection_is_int, MARSHAL_INFECTION == (int)MARSHAL_INFECTION);
struct dump_arg {
VALUE str, dest;