diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/array.h | 8 | ||||
| -rw-r--r-- | include/mruby/data.h | 12 | ||||
| -rw-r--r-- | include/mruby/dump.h | 4 | ||||
| -rw-r--r-- | include/mruby/range.h | 6 | ||||
| -rw-r--r-- | include/mruby/string.h | 8 |
5 files changed, 19 insertions, 19 deletions
diff --git a/include/mruby/array.h b/include/mruby/array.h index c5959bbe6..9f9483545 100644 --- a/include/mruby/array.h +++ b/include/mruby/array.h @@ -11,18 +11,18 @@ extern "C" { #endif -struct mrb_shared_array { +typedef struct mrb_shared_array { int refcnt; mrb_value *ptr; int len; -}; +} mrb_shared_array; struct RArray { MRB_OBJECT_HEADER; int len; union { int capa; - struct mrb_shared_array *shared; + mrb_shared_array *shared; } aux; mrb_value *ptr; }; @@ -35,7 +35,7 @@ struct RArray { #define RARRAY_PTR(a) (RARRAY(a)->ptr) #define MRB_ARY_SHARED 256 -void mrb_ary_decref(mrb_state*, struct mrb_shared_array*); +void mrb_ary_decref(mrb_state*, mrb_shared_array*); mrb_value mrb_ary_new_capa(mrb_state*, int); mrb_value mrb_ary_new(mrb_state *mrb); mrb_value mrb_ary_new_elts(mrb_state *mrb, int n, const mrb_value *elts); diff --git a/include/mruby/data.h b/include/mruby/data.h index 6492fd6ea..55405e994 100644 --- a/include/mruby/data.h +++ b/include/mruby/data.h @@ -11,19 +11,19 @@ extern "C" { #endif -struct mrb_data_type { +typedef struct mrb_data_type { const char *struct_name; void (*dfree)(mrb_state *mrb, void*); -}; +} mrb_data_type; struct RData { MRB_OBJECT_HEADER; struct iv_tbl *iv; - struct mrb_data_type *type; + mrb_data_type *type; void *data; }; -struct RData *mrb_data_object_alloc(mrb_state *mrb, struct RClass* klass, void *datap, const struct mrb_data_type *type); +struct RData *mrb_data_object_alloc(mrb_state *mrb, struct RClass* klass, void *datap, const mrb_data_type *type); #define Data_Wrap_Struct(mrb,klass,type,ptr)\ mrb_data_object_alloc(mrb,klass,ptr,type) @@ -37,8 +37,8 @@ struct RData *mrb_data_object_alloc(mrb_state *mrb, struct RClass* klass, void * #define RDATA(obj) ((struct RData *)((obj).value.p)) #define DATA_PTR(d) (RDATA(d)->data) #define DATA_TYPE(d) (RDATA(d)->type) -void *mrb_get_datatype(mrb_state *mrb, mrb_value, const struct mrb_data_type*); -void *mrb_check_datatype(mrb_state *mrb, mrb_value, const struct mrb_data_type*); +void *mrb_get_datatype(mrb_state *mrb, mrb_value, const mrb_data_type*); +void *mrb_check_datatype(mrb_state *mrb, mrb_value, const mrb_data_type*); #define Data_Get_Struct(mrb,obj,type,sval) do {\ *(void**)&sval = mrb_check_datatype(mrb, obj, type); \ } while (0) diff --git a/include/mruby/dump.h b/include/mruby/dump.h index eb8fe55dd..8b78e74d0 100644 --- a/include/mruby/dump.h +++ b/include/mruby/dump.h @@ -82,7 +82,7 @@ mrb_value mrb_load_irep_file(mrb_state*,FILE*); #define MRB_DUMP_DEFAULT_STR_LEN 128 //Rite Binary file_header -typedef struct _rite_binary_header { +typedef struct { unsigned char rbfi[4]; //Rite Binary File Identify unsigned char rbfv[8]; //Rite Binary File Format Version unsigned char risv[8]; //Rite Instruction Specification Version @@ -95,7 +95,7 @@ typedef struct _rite_binary_header { } rite_binary_header; // Rite File file_header -typedef struct _rite_file_header { +typedef struct { unsigned char rbfi[4]; //Rite Binary File Identify unsigned char rbfv[8]; //Rite Binary File Format Version unsigned char risv[8]; //Rite Instruction Specification Version diff --git a/include/mruby/range.h b/include/mruby/range.h index 32094f9bb..a87f1cc6a 100644 --- a/include/mruby/range.h +++ b/include/mruby/range.h @@ -11,14 +11,14 @@ extern "C" { #endif -struct mrb_range_edges { +typedef struct mrb_range_edges { mrb_value beg; mrb_value end; -}; +} mrb_range_edges; struct RRange { MRB_OBJECT_HEADER; - struct mrb_range_edges *edges; + mrb_range_edges *edges; int excl; }; diff --git a/include/mruby/string.h b/include/mruby/string.h index 426cbe9ff..353d8cefc 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -21,18 +21,18 @@ extern "C" { extern const char mrb_digitmap[]; -struct mrb_shared_string { +typedef struct mrb_shared_string { int refcnt; char *ptr; int len; -}; +} mrb_shared_string; struct RString { MRB_OBJECT_HEADER; int len; union { int capa; - struct mrb_shared_string *shared; + mrb_shared_string *shared; } aux; char *ptr; }; @@ -45,7 +45,7 @@ struct RString { #define RSTRING_END(s) (RSTRING(s)->ptr + RSTRING(s)->len) #define MRB_STR_SHARED 256 -void mrb_str_decref(mrb_state*, struct mrb_shared_string*); +void mrb_str_decref(mrb_state*, mrb_shared_string*); mrb_value mrb_str_literal(mrb_state*, mrb_value); void mrb_str_concat(mrb_state*, mrb_value, mrb_value); mrb_value mrb_str_plus(mrb_state*, mrb_value, mrb_value); |
