diff options
| -rw-r--r-- | include/mruby.h | 18 | ||||
| -rw-r--r-- | include/mruby/string.h | 2 | ||||
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 2 | ||||
| -rw-r--r-- | mrbgems/mruby-range-ext/src/range.c | 4 | ||||
| -rw-r--r-- | src/class.c | 6 | ||||
| -rw-r--r-- | src/codegen.c | 2 | ||||
| -rw-r--r-- | src/kernel.c | 6 | ||||
| -rw-r--r-- | src/object.c | 10 | ||||
| -rw-r--r-- | src/range.c | 6 | ||||
| -rw-r--r-- | src/string.c | 4 | ||||
| -rw-r--r-- | src/symbol.c | 4 |
11 files changed, 32 insertions, 32 deletions
diff --git a/include/mruby.h b/include/mruby.h index a7f2a49c4..85b464b8e 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -176,13 +176,13 @@ void mrb_undef_class_method(mrb_state*, struct RClass*, const char*); mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv); struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super); struct RClass * mrb_module_new(mrb_state *mrb); -int mrb_class_defined(mrb_state *mrb, const char *name); +mrb_bool mrb_class_defined(mrb_state *mrb, const char *name); struct RClass * mrb_class_get(mrb_state *mrb, const char *name); struct RClass * mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name); mrb_value mrb_obj_dup(mrb_state *mrb, mrb_value obj); mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char *method); -int mrb_obj_respond_to(struct RClass* c, mrb_sym mid); +mrb_bool mrb_obj_respond_to(struct RClass* c, mrb_sym mid); struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super); struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name); @@ -264,13 +264,13 @@ void mrb_p(mrb_state*, mrb_value); mrb_int mrb_obj_id(mrb_value obj); mrb_sym mrb_obj_to_sym(mrb_state *mrb, mrb_value name); -int mrb_obj_eq(mrb_state*, mrb_value, mrb_value); -int mrb_obj_equal(mrb_state*, mrb_value, mrb_value); -int mrb_equal(mrb_state *mrb, mrb_value obj1, mrb_value obj2); +mrb_bool mrb_obj_eq(mrb_state*, mrb_value, mrb_value); +mrb_bool mrb_obj_equal(mrb_state*, mrb_value, mrb_value); +mrb_bool mrb_equal(mrb_state *mrb, mrb_value obj1, mrb_value obj2); mrb_value mrb_Integer(mrb_state *mrb, mrb_value val); mrb_value mrb_Float(mrb_state *mrb, mrb_value val); mrb_value mrb_inspect(mrb_state *mrb, mrb_value obj); -int mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2); +mrb_bool mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2); void mrb_garbage_collect(mrb_state*); void mrb_incremental_gc(mrb_state *); @@ -292,7 +292,7 @@ const char * mrb_obj_classname(mrb_state *mrb, mrb_value obj); struct RClass* mrb_obj_class(mrb_state *mrb, mrb_value obj); mrb_value mrb_class_path(mrb_state *mrb, struct RClass *c); mrb_value mrb_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char *tname, const char *method); -int mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c); +mrb_bool mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c); mrb_value mrb_obj_inspect(mrb_state *mrb, mrb_value self); mrb_value mrb_obj_clone(mrb_state *mrb, mrb_value self); @@ -369,8 +369,8 @@ void mrb_define_global_const(mrb_state *mrb, const char *name, mrb_value val); mrb_value mrb_block_proc(void); mrb_value mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id); -int mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid); -int mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c); +mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid); +mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c); /* memory pool implementation */ typedef struct mrb_pool mrb_pool; diff --git a/include/mruby/string.h b/include/mruby/string.h index 26d1344d8..000c80b09 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -57,7 +57,7 @@ mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str); mrb_int mrb_str_hash(mrb_state *mrb, mrb_value str); mrb_value mrb_str_buf_append(mrb_state *mrb, mrb_value str, mrb_value str2); mrb_value mrb_str_inspect(mrb_state *mrb, mrb_value str); -int mrb_str_equal(mrb_state *mrb, mrb_value str1, mrb_value str2); +mrb_bool mrb_str_equal(mrb_state *mrb, mrb_value str1, mrb_value str2); mrb_value mrb_str_dump(mrb_state *mrb, mrb_value str); mrb_value mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len); mrb_value mrb_str_append(mrb_state *mrb, mrb_value str, mrb_value str2); diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index 7f2fcf282..eb7194f30 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -38,7 +38,7 @@ p(mrb_state *mrb, mrb_value obj, int prompt) /* Guess if the user might want to enter more * or if he wants an evaluation of his code now */ -int +mrb_bool is_code_block_open(struct mrb_parser_state *parser) { int code_block_open = FALSE; diff --git a/mrbgems/mruby-range-ext/src/range.c b/mrbgems/mruby-range-ext/src/range.c index 377677ffb..4e17dac8c 100644 --- a/mrbgems/mruby-range-ext/src/range.c +++ b/mrbgems/mruby-range-ext/src/range.c @@ -1,7 +1,7 @@ #include "mruby.h" #include "mruby/range.h" -static int +static mrb_bool r_le(mrb_state *mrb, mrb_value a, mrb_value b) { mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); /* compare result */ @@ -15,7 +15,7 @@ r_le(mrb_state *mrb, mrb_value a, mrb_value b) return FALSE; } -static int +static mrb_bool r_lt(mrb_state *mrb, mrb_value a, mrb_value b) { mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); diff --git a/src/class.c b/src/class.c index 9868d0080..606a54a7c 100644 --- a/src/class.c +++ b/src/class.c @@ -203,7 +203,7 @@ mrb_vm_define_class(mrb_state *mrb, mrb_value outer, mrb_value super, mrb_sym id return c; } -int +mrb_bool mrb_class_defined(mrb_state *mrb, const char *name) { mrb_value sym = mrb_check_intern_cstr(mrb, name); @@ -1172,7 +1172,7 @@ mrb_bob_missing(mrb_state *mrb, mrb_value mod) return mrb_nil_value(); } -int +mrb_bool mrb_obj_respond_to(struct RClass* c, mrb_sym mid) { khiter_t k; @@ -1196,7 +1196,7 @@ mrb_obj_respond_to(struct RClass* c, mrb_sym mid) return FALSE; /* no method */ } -int +mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid) { return mrb_obj_respond_to(mrb_class(mrb, obj), mid); diff --git a/src/codegen.c b/src/codegen.c index 8dd5a124d..37176653b 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -683,7 +683,7 @@ scope_body(codegen_scope *s, node *tree) return idx - s->idx; } -static int +static mrb_bool nosplat(node *t) { while (t) { diff --git a/src/kernel.c b/src/kernel.c index 965b80b95..ae8d24710 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -26,7 +26,7 @@ typedef enum { NOEX_RESPONDS = 0x80 } mrb_method_flag_t; -int +mrb_bool mrb_obj_basic_to_s_p(mrb_state *mrb, mrb_value obj) { struct RProc *me = mrb_method_search(mrb, mrb_class(mrb, obj), mrb_intern2(mrb, "to_s", 4)); @@ -521,7 +521,7 @@ mrb_obj_instance_eval(mrb_state *mrb, mrb_value self) return mrb_yield_internal(mrb, b, 0, 0, self, c); } -int +mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c) { if (mrb_obj_class(mrb, obj) == c) return TRUE; @@ -938,7 +938,7 @@ mrb_obj_remove_instance_variable(mrb_state *mrb, mrb_value self) return val; } -static inline int +static inline mrb_bool basic_obj_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym id, int pub) { return mrb_respond_to(mrb, obj, id); diff --git a/src/object.c b/src/object.c index 4003452cc..5b2278767 100644 --- a/src/object.c +++ b/src/object.c @@ -11,7 +11,7 @@ #include "mruby/string.h" #include "error.h" -int +mrb_bool mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2) { if (mrb_type(v1) != mrb_type(v2)) return FALSE; @@ -33,14 +33,14 @@ mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2) } } -int +mrb_bool mrb_obj_equal(mrb_state *mrb, mrb_value v1, mrb_value v2) { /* temporary definition */ return mrb_obj_eq(mrb, v1, v2); } -int +mrb_bool mrb_equal(mrb_state *mrb, mrb_value obj1, mrb_value obj2) { mrb_value result; @@ -468,7 +468,7 @@ mrb_any_to_s(mrb_state *mrb, mrb_value obj) * b.kind_of? M #=> true */ -int +mrb_bool mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c) { struct RClass *cl = mrb_class(mrb, obj); @@ -585,7 +585,7 @@ mrb_inspect(mrb_state *mrb, mrb_value obj) return mrb_obj_as_string(mrb, mrb_funcall(mrb, obj, "inspect", 0, 0)); } -int +mrb_bool mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2) { if (mrb_obj_eq(mrb, obj1, obj2)) return TRUE; diff --git a/src/range.c b/src/range.c index 92eddfe8c..6e313df51 100644 --- a/src/range.c +++ b/src/range.c @@ -170,7 +170,7 @@ mrb_range_eq(mrb_state *mrb, mrb_value range) return mrb_true_value(); } -static int +static mrb_bool r_le(mrb_state *mrb, mrb_value a, mrb_value b) { mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); /* compare result */ @@ -184,7 +184,7 @@ r_le(mrb_state *mrb, mrb_value a, mrb_value b) return FALSE; } -static int +static mrb_bool r_gt(mrb_state *mrb, mrb_value a, mrb_value b) { mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); @@ -197,7 +197,7 @@ r_gt(mrb_state *mrb, mrb_value a, mrb_value b) return FALSE; } -static int +static mrb_bool r_ge(mrb_state *mrb, mrb_value a, mrb_value b) { mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); /* compare result */ diff --git a/src/string.c b/src/string.c index 59a1df455..975f6cdb9 100644 --- a/src/string.c +++ b/src/string.c @@ -595,7 +595,7 @@ mrb_str_cmp_m(mrb_state *mrb, mrb_value str1) return mrb_fixnum_value(result); } -static int +static mrb_bool str_eql(mrb_state *mrb, const mrb_value str1, const mrb_value str2) { const mrb_int len = RSTRING_LEN(str1); @@ -606,7 +606,7 @@ str_eql(mrb_state *mrb, const mrb_value str1, const mrb_value str2) return FALSE; } -int +mrb_bool mrb_str_equal(mrb_state *mrb, mrb_value str1, mrb_value str2) { if (mrb_obj_equal(mrb, str1, str2)) return TRUE; diff --git a/src/symbol.c b/src/symbol.c index c29f7c6ae..bd8dce7df 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -251,7 +251,7 @@ sym_to_sym(mrb_state *mrb, mrb_value sym) #endif #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_')) -static int +static mrb_bool is_special_global_name(const char* m) { switch (*m) { @@ -274,7 +274,7 @@ is_special_global_name(const char* m) return !*m; } -static int +static mrb_bool symname_p(const char *name) { const char *m = name; |
