Skip to content

Commit

Permalink
marshal.c: use STATIC_ASSERT
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Sep 25, 2015
1 parent 460152e commit 2c1aa2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2c1aa2c

Please sign in to comment.