summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-11 07:39:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-11 07:39:16 +0000
commit646f27b8220ead3cb68cfd8f6e9870d203c430e4 (patch)
tree9fa0d68c5c6a149ea2c2b1226d3e2b1688186d20 /re.c
parent7554dd13468b105faec11f5d8ffef4499381c59d (diff)
* encoding.c (rb_enc_ascget): renamed from rb_enc_get_ascii.
* include/ruby/encoding.h: follow the renaming. * re.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/re.c b/re.c
index 20fbf28d82..76c42c393f 100644
--- a/re.c
+++ b/re.c
@@ -222,7 +222,7 @@ rb_reg_expr_str(VALUE str, const char *s, long len)
p = s; pend = p + len;
while (p<pend) {
- c = rb_enc_get_ascii(p, pend, &clen, enc);
+ c = rb_enc_ascget(p, pend, &clen, enc);
if (c == -1) {
p += mbclen(p, pend, enc);
}
@@ -240,7 +240,7 @@ rb_reg_expr_str(VALUE str, const char *s, long len)
else {
p = s;
while (p<pend) {
- c = rb_enc_get_ascii(p, pend, &clen, enc);
+ c = rb_enc_ascget(p, pend, &clen, enc);
if (c == '\\' && p+clen < pend) {
int n = clen + mbclen(p+clen, pend, enc);
rb_str_buf_cat(str, p, n);
@@ -2387,7 +2387,7 @@ rb_reg_quote(VALUE str)
s = RSTRING_PTR(str);
send = s + RSTRING_LEN(str);
while (s < send) {
- c = rb_enc_get_ascii(s, send, &clen, enc);
+ c = rb_enc_ascget(s, send, &clen, enc);
if (c == -1) {
s += mbclen(s, send, enc);
continue;
@@ -2420,7 +2420,7 @@ rb_reg_quote(VALUE str)
t += s - RSTRING_PTR(str);
while (s < send) {
- c = rb_enc_get_ascii(s, send, &clen, enc);
+ c = rb_enc_ascget(s, send, &clen, enc);
if (c == -1) {
int n = mbclen(s, send, enc);
@@ -2694,7 +2694,7 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp)
e = s + RSTRING_LEN(str);
while (s < e) {
- int c = rb_enc_get_ascii(s, e, &clen, enc);
+ int c = rb_enc_ascget(s, e, &clen, enc);
char *ss;
if (c == -1) {
@@ -2711,7 +2711,7 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp)
}
rb_str_buf_cat(val, p, ss-p);
- c = rb_enc_get_ascii(s, e, &clen, enc);
+ c = rb_enc_ascget(s, e, &clen, enc);
if (c == -1) {
s += mbclen(s, e, enc);
rb_str_buf_cat(val, ss, s-ss);
@@ -2732,12 +2732,12 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp)
break;
case 'k':
- if (s < e && rb_enc_get_ascii(s, e, &clen, enc) == '<') {
+ if (s < e && rb_enc_ascget(s, e, &clen, enc) == '<') {
char *name, *name_end;
name_end = name = s + clen;
while (name_end < e) {
- c = rb_enc_get_ascii(name_end, e, &clen, enc);
+ c = rb_enc_ascget(name_end, e, &clen, enc);
if (c == '>') break;
name_end += c == -1 ? mbclen(name_end, e, enc) : clen;
}