mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
internal.h: use built-in encoding indexes
* internal.h (rb_{ascii8bit,utf8,usascii}_encindex): use built-in encoding indexes for optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
869a1b5876
commit
ea2b115efd
4 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
Tue Jul 2 17:22:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Tue Jul 2 17:22:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* internal.h (rb_{ascii8bit,utf8,usascii}_encindex): use built-in
|
||||
encoding indexes for optimization.
|
||||
|
||||
* encoding.c (enc_inspect, rb_locale_encindex),
|
||||
(enc_set_filesystem_encoding, rb_filesystem_encindex): use built-in
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#endif
|
||||
#include "ruby/util.h"
|
||||
|
||||
#undef rb_ascii8bit_encindex
|
||||
#undef rb_utf8_encindex
|
||||
#undef rb_usascii_encindex
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 4
|
||||
#pragma GCC visibility push(default)
|
||||
int rb_enc_register(const char *name, rb_encoding *encoding);
|
||||
|
|
|
@ -209,6 +209,9 @@ enum ruby_preserved_encindex {
|
|||
ENCINDEX_BUILTIN_MAX
|
||||
};
|
||||
#endif
|
||||
#define rb_ascii8bit_encindex() ENCINDEX_ASCII
|
||||
#define rb_utf8_encindex() ENCINDEX_UTF_8
|
||||
#define rb_usascii_encindex() ENCINDEX_US_ASCII
|
||||
ID rb_id_encoding(void);
|
||||
void rb_gc_mark_encodings(void);
|
||||
|
||||
|
|
2
thread.c
2
thread.c
|
@ -59,10 +59,10 @@
|
|||
|
||||
#include "eval_intern.h"
|
||||
#include "gc.h"
|
||||
#include "internal.h"
|
||||
#include "timev.h"
|
||||
#include "ruby/io.h"
|
||||
#include "ruby/thread.h"
|
||||
#include "internal.h"
|
||||
|
||||
#ifndef USE_NATIVE_THREAD_PRIORITY
|
||||
#define USE_NATIVE_THREAD_PRIORITY 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue