summaryrefslogtreecommitdiff
path: root/enc/shift_jis.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-03 07:37:25 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-03 07:37:25 +0000
commit10354c7b5c5d09b2b059fe96c072938145247c5b (patch)
treead4a7e8c9c778649140539fe9080931177eef8ba /enc/shift_jis.c
parenta3b4b499a5ddd35572d7033ddb28ecf1c668bfce (diff)
* enc/shift_jis.c (code_to_mbc): cast as int from the subtraction of pointers.
* enc/utf_16le.c (utf16le_mbc_enc_len): use ptrdiff_t. * enc/utf_32be.c (utf32be_left_adjust_char_head): ditto. * enc/utf_32le.c (utf32le_left_adjust_char_head): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/shift_jis.c')
-rw-r--r--enc/shift_jis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enc/shift_jis.c b/enc/shift_jis.c
index ee726cf71a..b8ca67dba1 100644
--- a/enc/shift_jis.c
+++ b/enc/shift_jis.c
@@ -175,7 +175,7 @@ code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
if (enclen(enc, buf) != (p - buf))
return REGERR_INVALID_CODE_POINT_VALUE;
#endif
- return p - buf;
+ return (int)(p - buf);
}
static int