diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-11 03:08:50 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-11 03:08:50 +0000 |
commit | 5802768b40e50cabfbfe0a198a44e01cbad9faae (patch) | |
tree | 04a037e87e0e86eac5a46d8582c77836767f53d2 /include/ruby | |
parent | 9ee1ab0e28c3e9538941a55f1703a1a1ffd5cddf (diff) | |
download | ruby-5802768b40e50cabfbfe0a198a44e01cbad9faae.tar.gz |
* encoding.c (rb_enc_get_ascii): add an argument to provide the
length of the returned character.
* include/ruby/encoding.h (rb_enc_get_ascii): add the argument.
* re.c (rb_reg_expr_str): modify rb_enc_get_ascii call.
(rb_reg_quote): ditto.
(rb_reg_regsub): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/encoding.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 38ba031e67..dd30e66dfd 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -72,14 +72,14 @@ rb_encoding * rb_enc_find(const char *name); /* ptr,endptr,encoding -> mbclen */ int rb_enc_mbclen(const char*, const char *, rb_encoding*); -/* ptr,endptr,encoding -> chlen, invalid or needmore */ -int rb_enc_precise_mbclen(const char*, const char *, rb_encoding*); +/* -> 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) -/* ptr,endptr,encoding -> 0x00..0x7f, -1 */ -int rb_enc_get_ascii(const char*, const char *, rb_encoding*); +/* -> 0x00..0x7f, -1 */ +int rb_enc_get_ascii(const char *p, const char *e, int *len, rb_encoding *enc); /* code,encoding -> codelen */ int rb_enc_codelen(int, rb_encoding*); |