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/array.c | |
| parent | 0878900fda882cdf597ba2bef9e2c8fe1809647a (diff) | |
| download | mruby-206f89e2090524f009fc5a87f42c15a453ebdbee.tar.gz mruby-206f89e2090524f009fc5a87f42c15a453ebdbee.zip | |
add MRB_API modifiers to mruby API functions
Diffstat (limited to 'src/array.c')
| -rw-r--r-- | src/array.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/array.c b/src/array.c index 875214105..00b045d51 100644 --- a/src/array.c +++ b/src/array.c @@ -51,14 +51,14 @@ ary_new_capa(mrb_state *mrb, mrb_int capa) return a; } -mrb_value +MRB_API mrb_value mrb_ary_new_capa(mrb_state *mrb, mrb_int capa) { struct RArray *a = ary_new_capa(mrb, capa); return mrb_obj_value(a); } -mrb_value +MRB_API mrb_value mrb_ary_new(mrb_state *mrb) { return mrb_ary_new_capa(mrb, 0); @@ -88,7 +88,7 @@ array_copy(mrb_value *dst, const mrb_value *src, mrb_int size) } } -mrb_value +MRB_API mrb_value mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals) { mrb_value ary; @@ -102,7 +102,7 @@ mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals) return ary; } -mrb_value +MRB_API mrb_value mrb_assoc_new(mrb_state *mrb, mrb_value car, mrb_value cdr) { struct RArray *a; @@ -153,7 +153,7 @@ ary_modify(mrb_state *mrb, struct RArray *a) } } -void +MRB_API void mrb_ary_modify(mrb_state *mrb, struct RArray* a) { mrb_write_barrier(mrb, (struct RBasic*)a); @@ -227,7 +227,7 @@ ary_shrink_capa(mrb_state *mrb, struct RArray *a) } } -mrb_value +MRB_API mrb_value mrb_ary_resize(mrb_state *mrb, mrb_value ary, mrb_int new_len) { mrb_int old_len; @@ -272,7 +272,7 @@ ary_concat(mrb_state *mrb, struct RArray *a, mrb_value *ptr, mrb_int blen) a->len = len; } -void +MRB_API void mrb_ary_concat(mrb_state *mrb, mrb_value self, mrb_value other) { struct RArray *a2 = mrb_ary_ptr(other); @@ -321,7 +321,7 @@ ary_replace(mrb_state *mrb, struct RArray *a, mrb_value *argv, mrb_int len) a->len = len; } -void +MRB_API void mrb_ary_replace(mrb_state *mrb, mrb_value self, mrb_value other) { struct RArray *a2 = mrb_ary_ptr(other); @@ -410,7 +410,7 @@ mrb_ary_reverse(mrb_state *mrb, mrb_value self) return ary; } -void +MRB_API void mrb_ary_push(mrb_state *mrb, mrb_value ary, mrb_value elem) { struct RArray *a = mrb_ary_ptr(ary); @@ -436,7 +436,7 @@ mrb_ary_push_m(mrb_state *mrb, mrb_value self) return self; } -mrb_value +MRB_API mrb_value mrb_ary_pop(mrb_state *mrb, mrb_value ary) { struct RArray *a = mrb_ary_ptr(ary); @@ -447,7 +447,7 @@ mrb_ary_pop(mrb_state *mrb, mrb_value ary) #define ARY_SHIFT_SHARED_MIN 10 -mrb_value +MRB_API mrb_value mrb_ary_shift(mrb_state *mrb, mrb_value self) { struct RArray *a = mrb_ary_ptr(self); @@ -483,7 +483,7 @@ mrb_ary_shift(mrb_state *mrb, mrb_value self) item = 0 self.unshift item p self #=> [0, 1, 2, 3] */ -mrb_value +MRB_API mrb_value mrb_ary_unshift(mrb_state *mrb, mrb_value self, mrb_value item) { struct RArray *a = mrb_ary_ptr(self); @@ -536,7 +536,7 @@ mrb_ary_unshift_m(mrb_state *mrb, mrb_value self) return self; } -mrb_value +MRB_API mrb_value mrb_ary_ref(mrb_state *mrb, mrb_value ary, mrb_int n) { struct RArray *a = mrb_ary_ptr(ary); @@ -548,7 +548,7 @@ mrb_ary_ref(mrb_state *mrb, mrb_value ary, mrb_int n) return a->ptr[n]; } -void +MRB_API void mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val) { struct RArray *a = mrb_ary_ptr(ary); @@ -572,7 +572,7 @@ mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val) mrb_field_write_barrier_value(mrb, (struct RBasic*)a, val); } -mrb_value +MRB_API mrb_value mrb_ary_splice(mrb_state *mrb, mrb_value ary, mrb_int head, mrb_int len, mrb_value rpl) { struct RArray *a = mrb_ary_ptr(ary); @@ -893,7 +893,7 @@ mrb_ary_rindex_m(mrb_state *mrb, mrb_value self) return mrb_nil_value(); } -mrb_value +MRB_API mrb_value mrb_ary_splat(mrb_state *mrb, mrb_value v) { if (mrb_array_p(v)) { @@ -915,7 +915,7 @@ mrb_ary_size(mrb_state *mrb, mrb_value self) return mrb_fixnum_value(a->len); } -mrb_value +MRB_API mrb_value mrb_ary_clear(mrb_state *mrb, mrb_value self) { struct RArray *a = mrb_ary_ptr(self); @@ -942,13 +942,13 @@ mrb_ary_empty_p(mrb_state *mrb, mrb_value self) return mrb_bool_value(a->len == 0); } -mrb_value +MRB_API mrb_value mrb_check_array_type(mrb_state *mrb, mrb_value ary) { return mrb_check_convert_type(mrb, ary, MRB_TT_ARRAY, "Array", "to_ary"); } -mrb_value +MRB_API mrb_value mrb_ary_entry(mrb_value ary, mrb_int offset) { if (offset < 0) { @@ -1012,7 +1012,7 @@ join_ary(mrb_state *mrb, mrb_value ary, mrb_value sep, mrb_value list) return result; } -mrb_value +MRB_API mrb_value mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep) { sep = mrb_obj_as_string(mrb, sep); |
