diff options
-rw-r--r-- | array.c | 3 | ||||
-rw-r--r-- | compile.c | 4 | ||||
-rw-r--r-- | dir.c | 3 | ||||
-rw-r--r-- | encoding.c | 1 | ||||
-rw-r--r-- | enum.c | 1 | ||||
-rw-r--r-- | error.c | 3 | ||||
-rw-r--r-- | ext/-test-/string/cstr.c | 1 | ||||
-rw-r--r-- | file.c | 3 | ||||
-rw-r--r-- | gc.c | 1 | ||||
-rw-r--r-- | hash.c | 3 | ||||
-rw-r--r-- | internal.h | 19 | ||||
-rw-r--r-- | io.c | 3 | ||||
-rw-r--r-- | load.c | 3 | ||||
-rw-r--r-- | localeinit.c | 1 | ||||
-rw-r--r-- | numeric.c | 3 | ||||
-rw-r--r-- | object.c | 3 | ||||
-rw-r--r-- | pack.c | 1 | ||||
-rw-r--r-- | re.c | 3 | ||||
-rw-r--r-- | ruby.c | 3 | ||||
-rw-r--r-- | sprintf.c | 3 | ||||
-rw-r--r-- | string.c | 3 | ||||
-rw-r--r-- | symbol.c | 3 | ||||
-rw-r--r-- | time.c | 1 | ||||
-rw-r--r-- | transcode.c | 1 | ||||
-rw-r--r-- | variable.c | 3 | ||||
-rw-r--r-- | vm.c | 1 | ||||
-rw-r--r-- | vm_backtrace.c | 3 | ||||
-rw-r--r-- | vm_core.h | 1 |
28 files changed, 58 insertions, 23 deletions
@@ -11,9 +11,10 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/util.h" #include "ruby/st.h" +#include "internal.h" #include "probes.h" #include "id.h" #include "debug_counter.h" @@ -9,13 +9,15 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/re.h" +#include "internal.h" #include "encindex.h" #include <math.h> #define USE_INSN_STACK_INCREASE 1 #include "vm_core.h" +#include "vm_debug.h" #include "iseq.h" #include "insns.inc" #include "insns_info.inc" @@ -11,9 +11,10 @@ **********************************************************************/ +#include "ruby/encoding.h" +#include "ruby/thread.h" #include "internal.h" #include "encindex.h" -#include "ruby/thread.h" #include <sys/types.h> #include <sys/stat.h> diff --git a/encoding.c b/encoding.c index 2043a69598..f2f34406b5 100644 --- a/encoding.c +++ b/encoding.c @@ -9,6 +9,7 @@ **********************************************************************/ +#include "ruby/encoding.h" #include "internal.h" #include "encindex.h" #include "regenc.h" @@ -9,6 +9,7 @@ **********************************************************************/ +#include "ruby/encoding.h" #include "internal.h" #include "ruby/util.h" #include "id.h" @@ -9,8 +9,9 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/st.h" +#include "internal.h" #include "ruby_assert.h" #include "vm_core.h" diff --git a/ext/-test-/string/cstr.c b/ext/-test-/string/cstr.c index 2a41b932db..71eafdb703 100644 --- a/ext/-test-/string/cstr.c +++ b/ext/-test-/string/cstr.c @@ -1,3 +1,4 @@ +#include "ruby/encoding.h" #include "internal.h" static VALUE @@ -24,10 +24,11 @@ #endif #include "id.h" -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/io.h" #include "ruby/util.h" #include "ruby/thread.h" +#include "internal.h" #include "dln.h" #include "encindex.h" @@ -14,6 +14,7 @@ #define rb_data_object_alloc rb_data_object_alloc #define rb_data_typed_object_alloc rb_data_typed_object_alloc +#include "ruby/encoding.h" #include "ruby/io.h" #include "ruby/st.h" #include "ruby/re.h" @@ -11,9 +11,10 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/st.h" #include "ruby/util.h" +#include "internal.h" #include <errno.h> #include "probes.h" #include "id.h" diff --git a/internal.h b/internal.h index 1a965991d3..b83999464c 100644 --- a/internal.h +++ b/internal.h @@ -13,7 +13,6 @@ #define RUBY_INTERNAL_H 1 #include "ruby.h" -#include "ruby/encoding.h" #if defined(__cplusplus) extern "C" { @@ -1149,8 +1148,10 @@ void Init_ext(void); /* encoding.c */ ID rb_id_encoding(void); void rb_gc_mark_encodings(void); +#ifdef RUBY_ENCODING_H rb_encoding *rb_enc_get_from_index(int index); rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2); +#endif int rb_encdb_replicate(const char *alias, const char *orig); int rb_encdb_alias(const char *alias, const char *orig); int rb_encdb_dummy(const char *name); @@ -1169,21 +1170,23 @@ extern VALUE rb_eEAGAIN; extern VALUE rb_eEWOULDBLOCK; extern VALUE rb_eEINPROGRESS; void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args); -VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list); VALUE rb_check_backtrace(VALUE); NORETURN(void rb_async_bug_errno(const char *,int)); const char *rb_builtin_type_name(int t); const char *rb_builtin_class_name(VALUE x); PRINTF_ARGS(void rb_sys_warn(const char *fmt, ...), 1, 2); PRINTF_ARGS(void rb_syserr_warn(int err, const char *fmt, ...), 2, 3); +PRINTF_ARGS(void rb_sys_warning(const char *fmt, ...), 1, 2); +PRINTF_ARGS(void rb_syserr_warning(int err, const char *fmt, ...), 2, 3); +#ifdef RUBY_ENCODING_H +VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list); PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3); PRINTF_ARGS(void rb_sys_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3); PRINTF_ARGS(void rb_syserr_enc_warn(int err, rb_encoding *enc, const char *fmt, ...), 3, 4); -PRINTF_ARGS(void rb_sys_warning(const char *fmt, ...), 1, 2); -PRINTF_ARGS(void rb_syserr_warning(int err, const char *fmt, ...), 2, 3); PRINTF_ARGS(void rb_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3); PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3); PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4); +#endif #define rb_raise_cstr(etype, mesg) \ rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg))) @@ -1801,17 +1804,23 @@ int rb_divert_reserved_fd(int fd); /* transcode.c */ extern VALUE rb_cEncodingConverter; +#ifdef RUBY_ENCODING_H size_t rb_econv_memsize(rb_econv_t *); +#endif /* us_ascii.c */ +#ifdef RUBY_ENCODING_H extern rb_encoding OnigEncodingUS_ASCII; +#endif /* util.c */ char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve); char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve); /* utf_8.c */ +#ifdef RUBY_ENCODING_H extern rb_encoding OnigEncodingUTF_8; +#endif /* variable.c */ void rb_gc_mark_global_tbl(void); @@ -1932,7 +1941,7 @@ NORETURN(void rb_unexpected_type(VALUE,int)); rb_unexpected_type((VALUE)(v), (t)) : (void)0) /* file.c (export) */ -#ifdef HAVE_READLINK +#if defined HAVE_READLINK && defined RUBY_ENCODING_H VALUE rb_readlink(VALUE path, rb_encoding *enc); #endif #ifdef __APPLE__ @@ -11,9 +11,10 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/io.h" #include "ruby/thread.h" +#include "internal.h" #include "dln.h" #include "encindex.h" #include "id.h" @@ -2,8 +2,9 @@ * load methods from eval.c */ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/util.h" +#include "internal.h" #include "dln.h" #include "eval_intern.h" #include "probes.h" diff --git a/localeinit.c b/localeinit.c index dc48d42561..bec29a6d46 100644 --- a/localeinit.c +++ b/localeinit.c @@ -9,6 +9,7 @@ **********************************************************************/ +#include "ruby/encoding.h" #include "internal.h" #include "encindex.h" #ifdef __CYGWIN__ @@ -9,8 +9,9 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/util.h" +#include "internal.h" #include "id.h" #include <assert.h> #include <ctype.h> @@ -11,9 +11,10 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/st.h" #include "ruby/util.h" +#include "internal.h" #include <stdio.h> #include <errno.h> #include <ctype.h> @@ -9,6 +9,7 @@ **********************************************************************/ +#include "ruby/encoding.h" #include "internal.h" #include <sys/types.h> #include <ctype.h> @@ -9,9 +9,10 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/re.h" #include "ruby/util.h" +#include "internal.h" #include "regint.h" #include "encindex.h" #include <ctype.h> @@ -15,8 +15,9 @@ #include <windows.h> #include <sys/cygwin.h> #endif -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/thread.h" +#include "internal.h" #include "eval_intern.h" #include "dln.h" #include <stdio.h> @@ -11,8 +11,9 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/re.h" +#include "internal.h" #include "id.h" #include <math.h> #include <stdarg.h> @@ -11,8 +11,9 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/re.h" +#include "internal.h" #include "encindex.h" #include "probes.h" #include "gc.h" @@ -9,8 +9,9 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/st.h" +#include "internal.h" #include "symbol.h" #include "gc.h" #include "probes.h" @@ -11,6 +11,7 @@ #define _DEFAULT_SOURCE #define _BSD_SOURCE +#include "ruby/encoding.h" #include "internal.h" #include <sys/types.h> #include <time.h> diff --git a/transcode.c b/transcode.c index 384fdd63fc..c524259354 100644 --- a/transcode.c +++ b/transcode.c @@ -9,6 +9,7 @@ **********************************************************************/ +#include "ruby/encoding.h" #include "internal.h" #include "transcode_data.h" #include <ctype.h> diff --git a/variable.c b/variable.c index b74bb7ef90..51891e235d 100644 --- a/variable.c +++ b/variable.c @@ -11,9 +11,10 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/st.h" #include "ruby/util.h" +#include "internal.h" #include "id_table.h" #include "constant.h" #include "id.h" @@ -14,6 +14,7 @@ #include "gc.h" #include "vm_core.h" +#include "vm_debug.h" #include "iseq.h" #include "eval_intern.h" #include "probes.h" diff --git a/vm_backtrace.c b/vm_backtrace.c index d82d73d963..d6a8a1370e 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -9,8 +9,9 @@ **********************************************************************/ -#include "internal.h" +#include "ruby/encoding.h" #include "ruby/debug.h" +#include "internal.h" #include "vm_core.h" #include "eval_intern.h" @@ -67,7 +67,6 @@ #include "ruby/st.h" #include "node.h" -#include "vm_debug.h" #include "vm_opts.h" #include "id.h" #include "method.h" |