summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-25 00:01:57 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-25 00:01:57 +0900
commit13f0f597c80aa6a59a3a593a9389649f59dc90e7 (patch)
tree24a59ef81b082bbabf58b5a35b856a17fb3a6b18 /src/string.c
parentd7d54b6e69be83a8905fd49d1d190bf7234424a7 (diff)
parente6e462c07dfa9b3bb787793e899af52648309faa (diff)
downloadmruby-13f0f597c80aa6a59a3a593a9389649f59dc90e7.tar.gz
mruby-13f0f597c80aa6a59a3a593a9389649f59dc90e7.zip
Merge pull request #1934 from ksss/safe-name
src/string.c RESIZE_CAPA use safe name variables
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/string.c b/src/string.c
index 648363a45..1fd43aa2e 100644
--- a/src/string.c
+++ b/src/string.c
@@ -72,12 +72,12 @@ mrb_str_strlen(mrb_state *mrb, struct RString *s)
#define RESIZE_CAPA(s,capacity) do {\
if (STR_EMBED_P(s)) {\
if (RSTRING_EMBED_LEN_MAX < (capacity)) {\
- char *const tmp = (char *)mrb_malloc(mrb, (capacity)+1);\
- const mrb_int len = STR_EMBED_LEN(s);\
- memcpy(tmp, s->as.ary, len);\
+ char *const __tmp__ = (char *)mrb_malloc(mrb, (capacity)+1);\
+ const mrb_int __len__ = STR_EMBED_LEN(s);\
+ memcpy(__tmp__, s->as.ary, __len__);\
STR_UNSET_EMBED_FLAG(s);\
- s->as.heap.ptr = tmp;\
- s->as.heap.len = len;\
+ s->as.heap.ptr = __tmp__;\
+ s->as.heap.len = __len__;\
s->as.heap.aux.capa = (capacity);\
}\
} else {\