summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-04-25 02:33:33 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-04-25 02:33:33 +0900
commit320f0711f08c54b709fccfbc07ba696e26c1a717 (patch)
treedac12190981e11698366dac103fc894223382de6 /src/string.c
parentd95c42eefdc3613aef54fb80dc2a0b49d5107bad (diff)
downloadmruby-320f0711f08c54b709fccfbc07ba696e26c1a717.tar.gz
mruby-320f0711f08c54b709fccfbc07ba696e26c1a717.zip
remove -Wsign-compare warnings
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c
index 1e3c7db3a..dd0889d92 100644
--- a/src/string.c
+++ b/src/string.c
@@ -32,11 +32,11 @@
}\
} while (0)
#define RSTRING_EMBED_LEN(s) \
- (size_t)((RSTRING(s)->flags & MRB_STR_EMBED_LEN_MASK) >> MRB_STR_EMBED_LEN_SHIFT)
+ (mrb_int)((RSTRING(s)->flags & MRB_STR_EMBED_LEN_MASK) >> MRB_STR_EMBED_LEN_SHIFT)
#define STR_EMBED_LEN(s)\
- (size_t)(((s)->flags & MRB_STR_EMBED_LEN_MASK) >> MRB_STR_EMBED_LEN_SHIFT)
+ (mrb_int)(((s)->flags & MRB_STR_EMBED_LEN_MASK) >> MRB_STR_EMBED_LEN_SHIFT)
#define STR_PTR(s) ((STR_EMBED_P(s)) ? (s)->as.ary : (s)->as.heap.ptr)
-#define STR_LEN(s) ((STR_EMBED_P(s)) ? STR_EMBED_LEN(s) : (size_t)(s)->as.heap.len)
+#define STR_LEN(s) ((STR_EMBED_P(s)) ? STR_EMBED_LEN(s) : (s)->as.heap.len)
const char mrb_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";