diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/array.h | 2 | ||||
-rw-r--r-- | internal/class.h | 9 | ||||
-rw-r--r-- | internal/compilers.h | 1 | ||||
-rw-r--r-- | internal/error.h | 11 | ||||
-rw-r--r-- | internal/gc.h | 8 | ||||
-rw-r--r-- | internal/hash.h | 10 | ||||
-rw-r--r-- | internal/io.h | 3 | ||||
-rw-r--r-- | internal/parse.h | 5 | ||||
-rw-r--r-- | internal/string.h | 4 | ||||
-rw-r--r-- | internal/struct.h | 21 | ||||
-rw-r--r-- | internal/symbol.h | 4 | ||||
-rw-r--r-- | internal/variable.h | 1 | ||||
-rw-r--r-- | internal/vm.h | 8 |
13 files changed, 67 insertions, 20 deletions
diff --git a/internal/array.h b/internal/array.h index 857edacf97..1c5de4bb32 100644 --- a/internal/array.h +++ b/internal/array.h @@ -9,7 +9,6 @@ * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ - #include "ruby/config.h" #include <stddef.h> /* for size_t */ #include "internal/static_assert.h" /* for STATIC_ASSERT */ @@ -87,6 +86,7 @@ RARY_TRANSIENT_UNSET(VALUE ary) #endif } +#undef rb_ary_new_from_args #if defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO) #define rb_ary_new_from_args(n, ...) \ __extension__ ({ \ diff --git a/internal/class.h b/internal/class.h index 254094e038..72d3b9ea54 100644 --- a/internal/class.h +++ b/internal/class.h @@ -16,8 +16,13 @@ #include "ruby/intern.h" /* for rb_alloc_func_t */ #include "ruby/ruby.h" /* for struct RBasic */ -#undef RClass /* See also include/ruby/backward.h */ -#undef RCLASS_SUPER +#ifdef RClass +# undef RClass /* See also include/ruby/backward.h */ +#endif + +#ifdef RCLASS_SUPER +# undef RCLASS_SUPER +#endif struct rb_deprecated_classext_struct { char conflict[sizeof(VALUE) * 3]; diff --git a/internal/compilers.h b/internal/compilers.h index 2b1189a670..68e2d33e28 100644 --- a/internal/compilers.h +++ b/internal/compilers.h @@ -9,7 +9,6 @@ * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ - #include "ruby/defines.h" /* for GCC_VERSION_SINCE */ #ifdef _MSC_VER diff --git a/internal/error.h b/internal/error.h index 6c645b21bb..cb2f23d262 100644 --- a/internal/error.h +++ b/internal/error.h @@ -17,7 +17,16 @@ #include "ruby/intern.h" /* for rb_exc_raise */ #include "ruby/ruby.h" /* for enum ruby_value_type */ -#undef Check_Type /* in ruby/ruby.h */ +#ifdef Check_Type +# undef Check_Type /* in ruby/ruby.h */ +#endif + +#ifdef rb_raise_static +# undef rb_raise_static +# undef rb_sys_fail_path +# undef rb_syserr_fail_path +#endif + #define rb_raise_static(e, m) \ rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m))) #ifdef RUBY_FUNCTION_NAME_STRING diff --git a/internal/gc.h b/internal/gc.h index 74e52187c7..36da0db53d 100644 --- a/internal/gc.h +++ b/internal/gc.h @@ -18,9 +18,11 @@ struct rb_execution_context_struct; /* in vm_core.h */ -#undef NEWOBJ_OF -#undef RB_NEWOBJ_OF -#undef RB_OBJ_WRITE +#ifdef NEWOBJ_OF +# undef NEWOBJ_OF +# undef RB_NEWOBJ_OF +# undef RB_OBJ_WRITE +#endif /* optimized version of NEWOBJ() */ #define RB_NEWOBJ_OF(var, T, c, f) \ diff --git a/internal/hash.h b/internal/hash.h index 634092e4c2..90a27fd189 100644 --- a/internal/hash.h +++ b/internal/hash.h @@ -55,8 +55,14 @@ struct RHash { }; #define RHASH(obj) (R_CAST(RHash)(obj)) -#undef RHASH_IFNONE -#undef RHASH_SIZE + +#ifdef RHASH_IFNONE +# undef RHASH_IFNONE +#endif + +#ifdef RHASH_SIZE +# undef RHASH_SIZE +#endif /* hash.c */ void rb_hash_st_table_set(VALUE hash, st_table *st); diff --git a/internal/io.h b/internal/io.h index e04dbcb67c..acdb4ffab7 100644 --- a/internal/io.h +++ b/internal/io.h @@ -19,6 +19,9 @@ VALUE rb_io_flush_raw(VALUE, int); size_t rb_io_memsize(const rb_io_t *); int rb_stderr_tty_p(void); void rb_io_fptr_finalize_internal(void *ptr); +#ifdef rb_io_fptr_finalize +# undef rb_io_fptr_finalize +#endif #define rb_io_fptr_finalize rb_io_fptr_finalize_internal RUBY_SYMBOL_EXPORT_BEGIN diff --git a/internal/parse.h b/internal/parse.h index bcde0fea7a..782c06a437 100644 --- a/internal/parse.h +++ b/internal/parse.h @@ -10,11 +10,6 @@ * file COPYING are met. Consult the file for details. */ #include "ruby/ruby.h" /* for VALUE */ - -#ifndef USE_SYMBOL_GC -# define USE_SYMBOL_GC 1 -#endif - struct rb_iseq_struct; /* in vm_core.h */ /* parse.y */ diff --git a/internal/string.h b/internal/string.h index dae4f1bdc0..f585163594 100644 --- a/internal/string.h +++ b/internal/string.h @@ -19,6 +19,10 @@ #define STR_NOEMBED FL_USER1 #define STR_SHARED FL_USER2 /* = ELTS_SHARED */ +#ifdef rb_fstring_cstr +# undef rb_fstring_cstr +#endif + /* string.c */ VALUE rb_fstring(VALUE); VALUE rb_fstring_cstr(const char *str); diff --git a/internal/struct.h b/internal/struct.h index b0f7f2eddd..f205dbd89e 100644 --- a/internal/struct.h +++ b/internal/struct.h @@ -12,6 +12,7 @@ #include "internal/gc.h" /* for RB_OBJ_WRITE */ #include "internal/stdbool.h" /* for bool */ #include "ruby/ruby.h" /* for struct RBasic */ +#include "internal/gc.h" /* for RB_OBJ_WRITE */ enum { RSTRUCT_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX, @@ -32,10 +33,22 @@ struct RStruct { }; #define RSTRUCT(obj) (R_CAST(RStruct)(obj)) -#undef RSTRUCT_LEN -#undef RSTRUCT_PTR -#undef RSTRUCT_SET -#undef RSTRUCT_GET + +#ifdef RSTRUCT_LEN +# undef RSTRUCT_LEN +#endif + +#ifdef RSTRUCT_PTR +# undef RSTRUCT_PTR +#endif + +#ifdef RSTRUCT_SET +# undef RSTRUCT_SET +#endif + +#ifdef RSTRUCT_GET +# undef RSTRUCT_GET +#endif /* struct.c */ VALUE rb_struct_init_copy(VALUE copy, VALUE s); diff --git a/internal/symbol.h b/internal/symbol.h index 0317f66561..8de6903ae2 100644 --- a/internal/symbol.h +++ b/internal/symbol.h @@ -13,6 +13,10 @@ #include "ruby/encoding.h" /* for rb_encoding */ #include "internal/compilers.h" /* for __has_builtin */ +#ifdef rb_sym_intern_ascii_cstr +# undef rb_sym_intern_ascii_cstr +#endif + /* symbol.c */ VALUE rb_to_symbol_type(VALUE obj); VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc); diff --git a/internal/variable.h b/internal/variable.h index 1cdc06e08d..5080fc13ef 100644 --- a/internal/variable.h +++ b/internal/variable.h @@ -9,7 +9,6 @@ * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ - #include "ruby/config.h" #include <stddef.h> /* for size_t */ #include "constant.h" /* for rb_const_entry_t */ diff --git a/internal/vm.h b/internal/vm.h index e9d2d09c6c..1bd7a98f7a 100644 --- a/internal/vm.h +++ b/internal/vm.h @@ -15,6 +15,14 @@ #include "ruby/ruby.h" /* for ID */ #include "ruby/st.h" /* for st_table */ +#ifdef rb_funcallv +# undef rb_funcallv +#endif + +#ifdef rb_method_basic_definition_p +# undef rb_method_basic_definition_p +#endif + /* I have several reasons to choose 64 here: * * - A cache line must be a power-of-two size. |