summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-15 15:43:40 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-15 15:43:40 +0900
commitc476c1b528eca69630eb6a174e77deaab384487d (patch)
tree834726bfe9671d5c02f0f4a2f6fa0b81ac7fe46a /src/class.c
parentb868ce8a77779ee1e8bdf63742fc29113916193a (diff)
downloadmruby-c476c1b528eca69630eb6a174e77deaab384487d.tar.gz
mruby-c476c1b528eca69630eb6a174e77deaab384487d.zip
symbol length type to be mrb_int
Diffstat (limited to 'src/class.c')
-rw-r--r--src/class.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/class.c b/src/class.c
index 72e96ece8..1a55009e4 100644
--- a/src/class.c
+++ b/src/class.c
@@ -1258,7 +1258,7 @@ mrb_class_path(mrb_state *mrb, struct RClass *c)
{
mrb_value path;
const char *name;
- size_t len;
+ mrb_int len;
mrb_sym classpath = mrb_intern_lit(mrb, "__classpath__");
path = mrb_obj_iv_get(mrb, (struct RObject*)c, classpath);
@@ -1545,7 +1545,7 @@ static void
check_cv_name_sym(mrb_state *mrb, mrb_sym id)
{
const char *s;
- size_t len;
+ mrb_int len;
s = mrb_sym2name_len(mrb, id, &len);
if (len < 3 || !(s[0] == '@' && s[1] == '@')) {
@@ -1557,7 +1557,8 @@ static void
check_cv_name_str(mrb_state *mrb, mrb_value str)
{
const char *s = RSTRING_PTR(str);
- size_t const len = RSTRING_LEN(str);
+ mrb_int len = RSTRING_LEN(str);
+
if (len < 3 || !(s[0] == '@' && s[1] == '@')) {
mrb_name_error(mrb, mrb_intern_str(mrb, str), "`%S' is not allowed as a class variable name", str);
}
@@ -1817,7 +1818,7 @@ static void
check_const_name_sym(mrb_state *mrb, mrb_sym id)
{
const char *s;
- size_t len;
+ mrb_int len;
s = mrb_sym2name_len(mrb, id, &len);
if (len < 1 || !ISUPPER(*s)) {