From 1ffc9ba3255f8b63164c42ea8304115f5a6b2464 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Wed, 13 Mar 2013 13:30:40 +0900 Subject: Define type mrb_bool. It is typedef-ed to _Bool on C99, unsigned int on MSVC. It is safer than applying 1bit bit-fields to signed int. For forward compatibility, you should substiture only 1 or 0 for the variable typed mrb_bool. --- include/mruby.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/mruby.h') diff --git a/include/mruby.h b/include/mruby.h index e058d409f..c5f359bd8 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -121,9 +121,9 @@ typedef struct mrb_state { size_t gc_threshold; int gc_interval_ratio; int gc_step_ratio; - unsigned int gc_disabled:1; - unsigned int gc_full:1; - unsigned int is_generational_gc_mode:1; + mrb_bool gc_disabled:1; + mrb_bool gc_full:1; + mrb_bool is_generational_gc_mode:1; size_t majorgc_old_threshold; struct alloca_header *mems; -- cgit v1.2.3