summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/array.c2
-rw-r--r--src/hash.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/array.c b/src/array.c
index 55e03c8ac..21c7e5d86 100644
--- a/src/array.c
+++ b/src/array.c
@@ -574,7 +574,7 @@ mrb_ary_splice(mrb_state *mrb, mrb_value ary, mrb_int head, mrb_int len, mrb_val
{
struct RArray *a = mrb_ary_ptr(ary);
mrb_int tail, size;
- mrb_value *argv;
+ const mrb_value *argv;
mrb_int i, argc;
ary_modify(mrb, a);
diff --git a/src/hash.c b/src/hash.c
index aa0322c8c..0bda2b48b 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -698,12 +698,13 @@ mrb_hash_keys(mrb_state *mrb, mrb_value hash)
{
khash_t(ht) *h = RHASH_TBL(hash);
khiter_t k;
- mrb_value ary, *p;
+ mrb_value ary;
+ mrb_value *p;
if (!h || kh_size(h) == 0) return mrb_ary_new(mrb);
ary = mrb_ary_new_capa(mrb, kh_size(h));
mrb_ary_set(mrb, ary, kh_size(h)-1, mrb_nil_value());
- p = RARRAY_PTR(ary);
+ p = mrb_ary_ptr(ary)->ptr;
for (k = kh_begin(h); k != kh_end(h); k++) {
if (kh_exist(h, k)) {
mrb_value kv = kh_key(h, k);