mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/encoding.h (enc_initialized_p): ENC_UNINITIALIZED
is not defined already. * include/ruby/encoding.h (ENC_FROM_ENCINDEX): removed because depending on a static variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4f39e639f4
commit
ec46ba5b90
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
Thu Mar 5 10:10:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/encoding.h (enc_initialized_p): ENC_UNINITIALIZED
|
||||
is not defined already.
|
||||
|
||||
* include/ruby/encoding.h (ENC_FROM_ENCINDEX): removed because
|
||||
depending on a static variable.
|
||||
|
||||
Thu Mar 5 04:42:52 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* test/ruby/test_array.rb: fix wrong test, and add a test for
|
||||
|
|
|
@ -184,13 +184,10 @@ VALUE rb_locale_charmap(VALUE klass);
|
|||
long rb_memsearch(const void*,long,const void*,long,rb_encoding*);
|
||||
|
||||
RUBY_EXTERN VALUE rb_cEncoding;
|
||||
#define enc_initialized_p(enc) ((enc)->ruby_encoding_index != ENC_UNINITIALIZED)
|
||||
#define ENC_DUMMY_FLAG (1<<24)
|
||||
#define ENC_INDEX_MASK (~(~0U<<24))
|
||||
|
||||
#define ENC_TO_ENCINDEX(enc) ((enc)->ruby_encoding_index & ENC_INDEX_MASK)
|
||||
#define ENC_FROM_ENCINDEX(idx) (RARRAY_PTR(rb_encoding_list)[idx])
|
||||
#define ENC_FROM_ENCODING(enc) ENC_FROM_ENCINDEX(ENC_TO_ENCINDEX(enc))
|
||||
|
||||
#define ENC_DUMMY_P(enc) ((enc)->ruby_encoding_index & ENC_DUMMY_FLAG)
|
||||
#define ENC_SET_DUMMY(enc) ((enc)->ruby_encoding_index |= ENC_DUMMY_FLAG)
|
||||
|
|
Loading…
Reference in a new issue