summaryrefslogtreecommitdiffstats
path: root/include/ruby/encoding.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-27 14:27:07 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-27 14:27:07 +0000
commita2e8e2022bcab4dd87ee5cf6f1ef1d9df1cf4c98 (patch)
treef29aa519ea99cfcb7a7f13ec44508510d9291a0b /include/ruby/encoding.h
parentc34eb9c4312bd142822fefcf0a04ae61ff79c635 (diff)
downloadruby-a2e8e2022bcab4dd87ee5cf6f1ef1d9df1cf4c98.tar.gz
ruby-a2e8e2022bcab4dd87ee5cf6f1ef1d9df1cf4c98.tar.xz
ruby-a2e8e2022bcab4dd87ee5cf6f1ef1d9df1cf4c98.zip
* include/ruby/oniguruma.h: precise mbclen API redesigned to avoid
inline functions. (onigenc_mbclen_charfound): removed. (onigenc_mbclen_needmore): removed. (onigenc_mbclen_recover): removed. (ONIGENC_MBCLEN_CHARFOUND): removed. (ONIGENC_MBCLEN_CHARFOUND_P): defined. (ONIGENC_MBCLEN_CHARFOUND_LEN): defined. (ONIGENC_MBCLEN_INVALID): removed. (ONIGENC_MBCLEN_INVALID_P): defined. (ONIGENC_MBCLEN_NEEDMORE): removed. (ONIGENC_MBCLEN_NEEDMORE_P): defined. (ONIGENC_MBCLEN_NEEDMORE_LEN): defined. (ONIGENC_MBC_ENC_LEN): use onigenc_mbclen_approximate. * regenc.c (onigenc_mbclen_approximate): defined. * include/ruby/encoding.h (MBCLEN_CHARFOUND): removed. (MBCLEN_INVALID): removed. (MBCLEN_NEEDMORE): removed. (MBCLEN_CHARFOUND_P): defined. (MBCLEN_INVALID_P): defined. (MBCLEN_NEEDMORE_P): defined. (MBCLEN_CHARFOUND_LEN): defined. (MBCLEN_NEEDMORE_LEN): defined. * encoding.c: use new API. * re.c: ditto. * string.c: ditto. * parse.y: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/encoding.h')
-rw-r--r--include/ruby/encoding.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index bebf13bb4..a65efa316 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -110,9 +110,11 @@ int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc);
/* -> chlen, invalid or needmore */
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
-#define MBCLEN_CHARFOUND(ret) ONIGENC_MBCLEN_CHARFOUND(ret)
-#define MBCLEN_INVALID(ret) ONIGENC_MBCLEN_INVALID(ret)
-#define MBCLEN_NEEDMORE(ret) ONIGENC_MBCLEN_NEEDMORE(ret)
+#define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret)
+#define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret)
+#define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret)
+#define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret)
+#define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret)
/* -> 0x00..0x7f, -1 */
int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc);