mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
encindex.h: ENCINDEX
* encindex.h: separate encoding index constants from internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ca5c9084dc
commit
078b6c9838
10 changed files with 83 additions and 24 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Sep 15 14:49:15 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* encindex.h: separate encoding index constants from internal.h.
|
||||||
|
|
||||||
Tue Sep 15 13:13:13 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Sep 15 13:13:13 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] correct block
|
* array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] correct block
|
||||||
|
|
|
@ -1327,6 +1327,7 @@ encoding.$(OBJEXT): $(hdrdir)/ruby/ruby.h
|
||||||
encoding.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
encoding.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
||||||
encoding.$(OBJEXT): {$(VPATH)}config.h
|
encoding.$(OBJEXT): {$(VPATH)}config.h
|
||||||
encoding.$(OBJEXT): {$(VPATH)}defines.h
|
encoding.$(OBJEXT): {$(VPATH)}defines.h
|
||||||
|
encoding.$(OBJEXT): {$(VPATH)}encindex.h
|
||||||
encoding.$(OBJEXT): {$(VPATH)}encoding.c
|
encoding.$(OBJEXT): {$(VPATH)}encoding.c
|
||||||
encoding.$(OBJEXT): {$(VPATH)}encoding.h
|
encoding.$(OBJEXT): {$(VPATH)}encoding.h
|
||||||
encoding.$(OBJEXT): {$(VPATH)}intern.h
|
encoding.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
|
@ -1432,6 +1433,7 @@ file.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
||||||
file.$(OBJEXT): {$(VPATH)}config.h
|
file.$(OBJEXT): {$(VPATH)}config.h
|
||||||
file.$(OBJEXT): {$(VPATH)}defines.h
|
file.$(OBJEXT): {$(VPATH)}defines.h
|
||||||
file.$(OBJEXT): {$(VPATH)}dln.h
|
file.$(OBJEXT): {$(VPATH)}dln.h
|
||||||
|
file.$(OBJEXT): {$(VPATH)}encindex.h
|
||||||
file.$(OBJEXT): {$(VPATH)}encoding.h
|
file.$(OBJEXT): {$(VPATH)}encoding.h
|
||||||
file.$(OBJEXT): {$(VPATH)}file.c
|
file.$(OBJEXT): {$(VPATH)}file.c
|
||||||
file.$(OBJEXT): {$(VPATH)}intern.h
|
file.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
|
@ -1555,6 +1557,7 @@ io.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
||||||
io.$(OBJEXT): {$(VPATH)}config.h
|
io.$(OBJEXT): {$(VPATH)}config.h
|
||||||
io.$(OBJEXT): {$(VPATH)}defines.h
|
io.$(OBJEXT): {$(VPATH)}defines.h
|
||||||
io.$(OBJEXT): {$(VPATH)}dln.h
|
io.$(OBJEXT): {$(VPATH)}dln.h
|
||||||
|
io.$(OBJEXT): {$(VPATH)}encindex.h
|
||||||
io.$(OBJEXT): {$(VPATH)}encoding.h
|
io.$(OBJEXT): {$(VPATH)}encoding.h
|
||||||
io.$(OBJEXT): {$(VPATH)}id.h
|
io.$(OBJEXT): {$(VPATH)}id.h
|
||||||
io.$(OBJEXT): {$(VPATH)}intern.h
|
io.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
|
@ -1670,6 +1673,7 @@ marshal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
|
||||||
marshal.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
marshal.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
||||||
marshal.$(OBJEXT): {$(VPATH)}config.h
|
marshal.$(OBJEXT): {$(VPATH)}config.h
|
||||||
marshal.$(OBJEXT): {$(VPATH)}defines.h
|
marshal.$(OBJEXT): {$(VPATH)}defines.h
|
||||||
|
marshal.$(OBJEXT): {$(VPATH)}encindex.h
|
||||||
marshal.$(OBJEXT): {$(VPATH)}encoding.h
|
marshal.$(OBJEXT): {$(VPATH)}encoding.h
|
||||||
marshal.$(OBJEXT): {$(VPATH)}id_table.h
|
marshal.$(OBJEXT): {$(VPATH)}id_table.h
|
||||||
marshal.$(OBJEXT): {$(VPATH)}intern.h
|
marshal.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
|
@ -1933,6 +1937,7 @@ re.$(OBJEXT): $(hdrdir)/ruby/ruby.h
|
||||||
re.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
re.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
||||||
re.$(OBJEXT): {$(VPATH)}config.h
|
re.$(OBJEXT): {$(VPATH)}config.h
|
||||||
re.$(OBJEXT): {$(VPATH)}defines.h
|
re.$(OBJEXT): {$(VPATH)}defines.h
|
||||||
|
re.$(OBJEXT): {$(VPATH)}encindex.h
|
||||||
re.$(OBJEXT): {$(VPATH)}encoding.h
|
re.$(OBJEXT): {$(VPATH)}encoding.h
|
||||||
re.$(OBJEXT): {$(VPATH)}intern.h
|
re.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
re.$(OBJEXT): {$(VPATH)}internal.h
|
re.$(OBJEXT): {$(VPATH)}internal.h
|
||||||
|
@ -2156,6 +2161,7 @@ string.$(OBJEXT): $(hdrdir)/ruby/ruby.h
|
||||||
string.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
string.$(OBJEXT): $(top_srcdir)/include/ruby.h
|
||||||
string.$(OBJEXT): {$(VPATH)}config.h
|
string.$(OBJEXT): {$(VPATH)}config.h
|
||||||
string.$(OBJEXT): {$(VPATH)}defines.h
|
string.$(OBJEXT): {$(VPATH)}defines.h
|
||||||
|
string.$(OBJEXT): {$(VPATH)}encindex.h
|
||||||
string.$(OBJEXT): {$(VPATH)}encoding.h
|
string.$(OBJEXT): {$(VPATH)}encoding.h
|
||||||
string.$(OBJEXT): {$(VPATH)}gc.h
|
string.$(OBJEXT): {$(VPATH)}gc.h
|
||||||
string.$(OBJEXT): {$(VPATH)}intern.h
|
string.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
|
|
67
encindex.h
Normal file
67
encindex.h
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
encindex.h -
|
||||||
|
|
||||||
|
$Author$
|
||||||
|
created at: Tue Sep 15 13:21:14 JST 2015
|
||||||
|
|
||||||
|
Copyright (C) 2015 Yukihiro Matsumoto
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef RUBY_ENCINDEX_H
|
||||||
|
#define RUBY_ENCINDEX_H 1
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#if 0
|
||||||
|
} /* satisfy cc-mode */
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum ruby_preserved_encindex {
|
||||||
|
RUBY_ENCINDEX_ASCII,
|
||||||
|
RUBY_ENCINDEX_UTF_8,
|
||||||
|
RUBY_ENCINDEX_US_ASCII,
|
||||||
|
|
||||||
|
/* preserved indexes */
|
||||||
|
RUBY_ENCINDEX_UTF_16BE,
|
||||||
|
RUBY_ENCINDEX_UTF_16LE,
|
||||||
|
RUBY_ENCINDEX_UTF_32BE,
|
||||||
|
RUBY_ENCINDEX_UTF_32LE,
|
||||||
|
RUBY_ENCINDEX_UTF_16,
|
||||||
|
RUBY_ENCINDEX_UTF_32,
|
||||||
|
RUBY_ENCINDEX_UTF8_MAC,
|
||||||
|
|
||||||
|
/* for old options of regexp */
|
||||||
|
RUBY_ENCINDEX_EUC_JP,
|
||||||
|
RUBY_ENCINDEX_Windows_31J,
|
||||||
|
|
||||||
|
RUBY_ENCINDEX_BUILTIN_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ENCINDEX_ASCII RUBY_ENCINDEX_ASCII
|
||||||
|
#define ENCINDEX_UTF_8 RUBY_ENCINDEX_UTF_8
|
||||||
|
#define ENCINDEX_US_ASCII RUBY_ENCINDEX_US_ASCII
|
||||||
|
#define ENCINDEX_UTF_16BE RUBY_ENCINDEX_UTF_16BE
|
||||||
|
#define ENCINDEX_UTF_16LE RUBY_ENCINDEX_UTF_16LE
|
||||||
|
#define ENCINDEX_UTF_32BE RUBY_ENCINDEX_UTF_32BE
|
||||||
|
#define ENCINDEX_UTF_32LE RUBY_ENCINDEX_UTF_32LE
|
||||||
|
#define ENCINDEX_UTF_16 RUBY_ENCINDEX_UTF_16
|
||||||
|
#define ENCINDEX_UTF_32 RUBY_ENCINDEX_UTF_32
|
||||||
|
#define ENCINDEX_UTF8_MAC RUBY_ENCINDEX_UTF8_MAC
|
||||||
|
#define ENCINDEX_EUC_JP RUBY_ENCINDEX_EUC_JP
|
||||||
|
#define ENCINDEX_Windows_31J RUBY_ENCINDEX_Windows_31J
|
||||||
|
#define ENCINDEX_BUILTIN_MAX RUBY_ENCINDEX_BUILTIN_MAX
|
||||||
|
|
||||||
|
#define rb_ascii8bit_encindex() RUBY_ENCINDEX_ASCII
|
||||||
|
#define rb_utf8_encindex() RUBY_ENCINDEX_UTF_8
|
||||||
|
#define rb_usascii_encindex() RUBY_ENCINDEX_US_ASCII
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#if 0
|
||||||
|
{ /* satisfy cc-mode */
|
||||||
|
#endif
|
||||||
|
} /* extern "C" { */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* RUBY_INTERNAL_H */
|
|
@ -10,6 +10,7 @@
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#include "encindex.h"
|
||||||
#include "regenc.h"
|
#include "regenc.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "ruby/util.h"
|
#include "ruby/util.h"
|
||||||
|
|
1
file.c
1
file.c
|
@ -28,6 +28,7 @@
|
||||||
#include "ruby/util.h"
|
#include "ruby/util.h"
|
||||||
#include "ruby/thread.h"
|
#include "ruby/thread.h"
|
||||||
#include "dln.h"
|
#include "dln.h"
|
||||||
|
#include "encindex.h"
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
24
internal.h
24
internal.h
|
@ -713,30 +713,6 @@ void Init_enc(void);
|
||||||
void Init_ext(void);
|
void Init_ext(void);
|
||||||
|
|
||||||
/* encoding.c */
|
/* encoding.c */
|
||||||
enum ruby_preserved_encindex {
|
|
||||||
ENCINDEX_ASCII,
|
|
||||||
ENCINDEX_UTF_8,
|
|
||||||
ENCINDEX_US_ASCII,
|
|
||||||
|
|
||||||
/* preserved indexes */
|
|
||||||
ENCINDEX_UTF_16BE,
|
|
||||||
ENCINDEX_UTF_16LE,
|
|
||||||
ENCINDEX_UTF_32BE,
|
|
||||||
ENCINDEX_UTF_32LE,
|
|
||||||
ENCINDEX_UTF_16,
|
|
||||||
ENCINDEX_UTF_32,
|
|
||||||
ENCINDEX_UTF8_MAC,
|
|
||||||
|
|
||||||
/* for old options of regexp */
|
|
||||||
ENCINDEX_EUC_JP,
|
|
||||||
ENCINDEX_Windows_31J,
|
|
||||||
|
|
||||||
ENCINDEX_BUILTIN_MAX
|
|
||||||
};
|
|
||||||
|
|
||||||
#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);
|
ID rb_id_encoding(void);
|
||||||
void rb_gc_mark_encodings(void);
|
void rb_gc_mark_encodings(void);
|
||||||
rb_encoding *rb_enc_get_from_index(int index);
|
rb_encoding *rb_enc_get_from_index(int index);
|
||||||
|
|
1
io.c
1
io.c
|
@ -15,6 +15,7 @@
|
||||||
#include "ruby/io.h"
|
#include "ruby/io.h"
|
||||||
#include "ruby/thread.h"
|
#include "ruby/thread.h"
|
||||||
#include "dln.h"
|
#include "dln.h"
|
||||||
|
#include "encindex.h"
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "ruby/io.h"
|
#include "ruby/io.h"
|
||||||
#include "ruby/st.h"
|
#include "ruby/st.h"
|
||||||
#include "ruby/util.h"
|
#include "ruby/util.h"
|
||||||
|
#include "encindex.h"
|
||||||
#include "id_table.h"
|
#include "id_table.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
1
re.c
1
re.c
|
@ -13,6 +13,7 @@
|
||||||
#include "ruby/re.h"
|
#include "ruby/re.h"
|
||||||
#include "ruby/util.h"
|
#include "ruby/util.h"
|
||||||
#include "regint.h"
|
#include "regint.h"
|
||||||
|
#include "encindex.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
VALUE rb_eRegexpError;
|
VALUE rb_eRegexpError;
|
||||||
|
|
1
string.c
1
string.c
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "ruby/re.h"
|
#include "ruby/re.h"
|
||||||
|
#include "encindex.h"
|
||||||
#include "probes.h"
|
#include "probes.h"
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
Loading…
Reference in a new issue