diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-04 00:47:08 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-04 00:47:08 +0900 |
| commit | 206f89e2090524f009fc5a87f42c15a453ebdbee (patch) | |
| tree | ac45fd2e3448aaa0d932bdd0261e62377dfa5e5e /src/object.c | |
| parent | 0878900fda882cdf597ba2bef9e2c8fe1809647a (diff) | |
| download | mruby-206f89e2090524f009fc5a87f42c15a453ebdbee.tar.gz mruby-206f89e2090524f009fc5a87f42c15a453ebdbee.zip | |
add MRB_API modifiers to mruby API functions
Diffstat (limited to 'src/object.c')
| -rw-r--r-- | src/object.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/object.c b/src/object.c index 49539464a..8c278f1f9 100644 --- a/src/object.c +++ b/src/object.c @@ -9,7 +9,7 @@ #include "mruby/numeric.h" #include "mruby/string.h" -mrb_bool +MRB_API mrb_bool mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2) { if (mrb_type(v1) != mrb_type(v2)) return FALSE; @@ -31,14 +31,14 @@ mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2) } } -mrb_bool +MRB_API mrb_bool mrb_obj_equal(mrb_state *mrb, mrb_value v1, mrb_value v2) { /* temporary definition */ return mrb_obj_eq(mrb, v1, v2); } -mrb_bool +MRB_API mrb_bool mrb_equal(mrb_state *mrb, mrb_value obj1, mrb_value obj2) { mrb_value result; @@ -319,7 +319,7 @@ convert_type(mrb_state *mrb, mrb_value val, const char *tname, const char *metho return mrb_funcall_argv(mrb, val, m, 0, 0); } -mrb_value +MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char *method) { mrb_value v; @@ -332,7 +332,7 @@ mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char *method) return v; } -mrb_value +MRB_API mrb_value mrb_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char *tname, const char *method) { mrb_value v; @@ -346,7 +346,7 @@ mrb_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char return v; } -mrb_value +MRB_API mrb_value mrb_check_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char *tname, const char *method) { mrb_value v; @@ -386,7 +386,7 @@ static const struct types { {-1, 0} }; -void +MRB_API void mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t) { const struct types *type = builtin_types; @@ -434,7 +434,7 @@ mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t) * initial execution context of Ruby programs returns ``main.'' */ -mrb_value +MRB_API mrb_value mrb_any_to_s(mrb_state *mrb, mrb_value obj) { mrb_value str = mrb_str_buf_new(mrb, 20); @@ -475,7 +475,7 @@ mrb_any_to_s(mrb_state *mrb, mrb_value obj) * b.kind_of? M #=> true */ -mrb_bool +MRB_API mrb_bool mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c) { struct RClass *cl = mrb_class(mrb, obj); @@ -513,7 +513,7 @@ mrb_to_integer(mrb_state *mrb, mrb_value val, const char *method) return v; } -mrb_value +MRB_API mrb_value mrb_to_int(mrb_state *mrb, mrb_value val) { return mrb_to_integer(mrb, val, "to_int"); @@ -558,13 +558,13 @@ arg_error: return tmp; } -mrb_value +MRB_API mrb_value mrb_Integer(mrb_state *mrb, mrb_value val) { return mrb_convert_to_integer(mrb, val, 0); } -mrb_value +MRB_API mrb_value mrb_Float(mrb_state *mrb, mrb_value val) { if (mrb_nil_p(val)) { @@ -585,13 +585,13 @@ mrb_Float(mrb_state *mrb, mrb_value val) } } -mrb_value +MRB_API mrb_value mrb_inspect(mrb_state *mrb, mrb_value obj) { return mrb_obj_as_string(mrb, mrb_funcall(mrb, obj, "inspect", 0)); } -mrb_bool +MRB_API mrb_bool mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2) { if (mrb_obj_eq(mrb, obj1, obj2)) return TRUE; |
