1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* include/ruby/encoding.h (rb_enc_step_back): cast 4th argument 'n'

as int because Ruby usually treats length value as long but
  onigenc_step_back's 4th argument is int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-02-03 00:38:55 +00:00
parent 8f84a1f537
commit c008ca5ae6
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Wed Feb 2 20:25:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
* include/ruby/encoding.h (rb_enc_step_back): cast 4th argument 'n'
as int because Ruby usually treats length value as long but
onigenc_step_back's 4th argument is int.
Thu Feb 3 07:20:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/to_ruby.rb: use Regexp::NOENCODING

View file

@ -162,7 +162,7 @@ int rb_enc_codelen(int code, rb_encoding *enc);
/* start, ptr, end, encoding -> next_char */
#define rb_enc_left_char_head(s,p,e,enc) (char *)onigenc_get_left_adjust_char_head(enc,(UChar*)(s),(UChar*)(p),(UChar*)(e))
#define rb_enc_right_char_head(s,p,e,enc) (char *)onigenc_get_right_adjust_char_head(enc,(UChar*)(s),(UChar*)(p),(UChar*)(e))
#define rb_enc_step_back(s,p,e,n,enc) (char *)onigenc_step_back(enc,(UChar*)(s),(UChar*)(p),(UChar*)(e),(n))
#define rb_enc_step_back(s,p,e,n,enc) (char *)onigenc_step_back(enc,(UChar*)(s),(UChar*)(p),(UChar*)(e),(int)(n))
/* ptr, ptr, encoding -> newline_or_not */
#define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE(enc,(UChar*)(p),(UChar*)(end))