Permalink
Browse files

Merge pull request #1840 from ksss/bit-field

set bit field for mrb_bool
  • Loading branch information...
2 parents 04dffc2 + 49a048c commit 86a48b7c48fad8cdaf747449c3df672ec24f3659 @matz matz committed Mar 10, 2014
Showing with 3 additions and 3 deletions.
  1. +1 −1 mrbgems/mruby-random/src/mt19937ar.h
  2. +1 −1 src/string.c
  3. +1 −1 src/symbol.c
@@ -15,7 +15,7 @@ typedef struct {
};
mrb_int seed;
- mrb_bool has_seed;
+ mrb_bool has_seed : 1;
} mt_state;
void mrb_random_init_genrand(mt_state *, unsigned long);
View
@@ -41,7 +41,7 @@
const char mrb_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
typedef struct mrb_shared_string {
- mrb_bool nofree;
+ mrb_bool nofree : 1;
int refcnt;
char *ptr;
mrb_int len;
View
@@ -12,7 +12,7 @@
/* ------------------------------------------------------ */
typedef struct symbol_name {
- mrb_bool lit;
+ mrb_bool lit : 1;
uint16_t len;
const char *name;
} symbol_name;

0 comments on commit 86a48b7

Please sign in to comment.