summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-01-06 14:52:04 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-01-06 14:52:04 +0900
commitc6a11725923090278bb4941579751650d9aaebce (patch)
tree6419a060b51dc1cdeac16055571212832659319e /src
parent9a76a0bd809e06089e6a09aa72e01ccf82806056 (diff)
downloadmruby-c6a11725923090278bb4941579751650d9aaebce.tar.gz
mruby-c6a11725923090278bb4941579751650d9aaebce.zip
Add pointer cast to pacify warnings.
Diffstat (limited to 'src')
-rw-r--r--src/string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c
index 5aaef5826..976c34687 100644
--- a/src/string.c
+++ b/src/string.c
@@ -132,12 +132,12 @@ resize_capa(mrb_state *mrb, struct RString *s, size_t capacity)
RSTR_UNSET_EMBED_FLAG(s);
s->as.heap.ptr = tmp;
s->as.heap.len = len;
- s->as.heap.aux.capa = capacity;
+ s->as.heap.aux.capa = (mrb_int)capacity;
}
}
else {
- s->as.heap.ptr = (char *)mrb_realloc(mrb, RSTR_PTR(s), capacity+1);
- s->as.heap.aux.capa = capacity;
+ s->as.heap.ptr = (char*)mrb_realloc(mrb, RSTR_PTR(s), capacity+1);
+ s->as.heap.aux.capa = (mrb_int)capacity;
}
}