summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-04-24 16:03:42 +0900
committerYukihiro Matsumoto <[email protected]>2012-04-24 16:03:42 +0900
commit2970b6aadbb0d5afef683854e0fe36b05024fc36 (patch)
tree52d2d734b7769b8473489c92bd9d685cea13adbc
parent2fc1b8af2db70e2e008cecb9fd2d8600034f95f9 (diff)
downloadmruby-2970b6aadbb0d5afef683854e0fe36b05024fc36.tar.gz
mruby-2970b6aadbb0d5afef683854e0fe36b05024fc36.zip
change type of RString.size from size_t to long
-rw-r--r--include/mruby/string.h2
-rw-r--r--src/cdump.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h
index 50dc2396d..ea9ca71ec 100644
--- a/include/mruby/string.h
+++ b/include/mruby/string.h
@@ -26,7 +26,7 @@ extern const char ruby_digitmap[];
struct RString {
MRUBY_OBJECT_HEADER;
- size_t len;
+ long len;
union {
size_t capa;
mrb_value shared;
diff --git a/src/cdump.c b/src/cdump.c
index d48139664..131a9891a 100644
--- a/src/cdump.c
+++ b/src/cdump.c
@@ -146,7 +146,7 @@ make_cdump_irep(mrb_state *mrb, int irep_no, FILE *f)
}
}
memset(buf, 0, buf_len);
- SOURCE_CODE(" irep->pool[%d] = mrb_str_new(mrb, \"%s\", %zd);", n, str_to_format(irep->pool[n], buf), RSTRING_LEN(irep->pool[n])); break;
+ SOURCE_CODE(" irep->pool[%d] = mrb_str_new(mrb, \"%s\", %ld);", n, str_to_format(irep->pool[n], buf), RSTRING_LEN(irep->pool[n])); break;
/* TODO MRB_TT_REGEX */
default: break;
}