* encoding.c, include/ruby/encoding.h
(rb_enc_associate, rb_enc_associate_index): returns obj. [ruby-dev:34778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
13f20ccda7
commit
fe8bb86125
@ -1,3 +1,9 @@
|
|||||||
|
Wed May 21 07:22:01 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* encoding.c, include/ruby/encoding.h
|
||||||
|
(rb_enc_associate, rb_enc_associate_index):
|
||||||
|
returns obj. [ruby-dev:34778]
|
||||||
|
|
||||||
Wed May 21 04:20:20 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
Wed May 21 04:20:20 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII.
|
* encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII.
|
||||||
|
@ -564,10 +564,10 @@ rb_enc_set_index(VALUE obj, int idx)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
VALUE
|
||||||
rb_enc_associate_index(VALUE obj, int idx)
|
rb_enc_associate_index(VALUE obj, int idx)
|
||||||
{
|
{
|
||||||
// enc_check_capable(obj);
|
/* enc_check_capable(obj);*/
|
||||||
if (rb_enc_get_index(obj) == idx)
|
if (rb_enc_get_index(obj) == idx)
|
||||||
return;
|
return;
|
||||||
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
|
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
|
||||||
@ -575,12 +575,13 @@ rb_enc_associate_index(VALUE obj, int idx)
|
|||||||
ENC_CODERANGE_CLEAR(obj);
|
ENC_CODERANGE_CLEAR(obj);
|
||||||
}
|
}
|
||||||
rb_enc_set_index(obj, idx);
|
rb_enc_set_index(obj, idx);
|
||||||
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
VALUE
|
||||||
rb_enc_associate(VALUE obj, rb_encoding *enc)
|
rb_enc_associate(VALUE obj, rb_encoding *enc)
|
||||||
{
|
{
|
||||||
rb_enc_associate_index(obj, rb_enc_to_index(enc));
|
return rb_enc_associate_index(obj, rb_enc_to_index(enc));
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_encoding*
|
rb_encoding*
|
||||||
|
@ -83,8 +83,8 @@ rb_encoding* rb_to_encoding(VALUE);
|
|||||||
rb_encoding* rb_enc_get(VALUE);
|
rb_encoding* rb_enc_get(VALUE);
|
||||||
rb_encoding* rb_enc_compatible(VALUE,VALUE);
|
rb_encoding* rb_enc_compatible(VALUE,VALUE);
|
||||||
rb_encoding* rb_enc_check(VALUE,VALUE);
|
rb_encoding* rb_enc_check(VALUE,VALUE);
|
||||||
void rb_enc_associate_index(VALUE, int);
|
VALUE rb_enc_associate_index(VALUE, int);
|
||||||
void rb_enc_associate(VALUE, rb_encoding*);
|
VALUE rb_enc_associate(VALUE, rb_encoding*);
|
||||||
void rb_enc_copy(VALUE dst, VALUE src);
|
void rb_enc_copy(VALUE dst, VALUE src);
|
||||||
|
|
||||||
VALUE rb_enc_str_new(const char*, long, rb_encoding*);
|
VALUE rb_enc_str_new(const char*, long, rb_encoding*);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user