diff options
-rw-r--r-- | hash.c | 12 | ||||
-rw-r--r-- | include/ruby/backward.h | 20 | ||||
-rw-r--r-- | include/ruby/intern.h | 22 | ||||
-rw-r--r-- | pack.c | 12 | ||||
-rw-r--r-- | struct.c | 6 | ||||
-rw-r--r-- | vm.c | 7 | ||||
-rw-r--r-- | vm_method.c | 6 |
7 files changed, 20 insertions, 65 deletions
@@ -84,12 +84,6 @@ static VALUE envtbl; static ID id_hash, id_yield, id_default, id_flatten_bang; VALUE -rb_hash_ifnone(VALUE h) -{ - return RHASH_IFNONE(h); -} - -VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone) { RB_OBJ_WRITE(hash, (&RHASH(hash)->ifnone), ifnone); @@ -266,12 +260,6 @@ rb_obj_hash(VALUE obj) return ST2FIX(hnum); } -int -rb_hash_iter_lev(VALUE h) -{ - return RHASH_ITER_LEV(h); -} - static const struct st_hash_type objhash = { rb_any_cmp, rb_any_hash, diff --git a/include/ruby/backward.h b/include/ruby/backward.h index 4574cb98da..2a92df38d2 100644 --- a/include/ruby/backward.h +++ b/include/ruby/backward.h @@ -1,6 +1,26 @@ #ifndef RUBY_RUBY_BACKWARD_H #define RUBY_RUBY_BACKWARD_H 1 +#define DECLARE_DEPRECATED_FEATURE(ver, func) \ + NORETURN(ERRORFUNC(("deprecated since "#ver), DEPRECATED(void func(void)))) + +/* eval.c */ +DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super); +DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super); + +/* hash.c */ +DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev); +DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone); + +/* string.c */ +DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate); +DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated); + +/* vm.c */ +DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache); +DECLARE_DEPRECATED_FEATURE(2.2, rb_frame_pop); + +/* from version.c */ #ifndef RUBY_SHOW_COPYRIGHT_TO_DIE # define RUBY_SHOW_COPYRIGHT_TO_DIE 1 #endif diff --git a/include/ruby/intern.h b/include/ruby/intern.h index efa8f4058c..2f6afaa0c3 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -371,24 +371,11 @@ NORETURN(VALUE rb_f_exit(int, const VALUE*)); NORETURN(VALUE rb_f_abort(int, const VALUE*)); void rb_remove_method(VALUE, const char*); void rb_remove_method_id(VALUE, ID); -DEPRECATED(static inline void rb_disable_super(void)); -DEPRECATED(static inline void rb_enable_super(void)); -static inline void rb_disable_super(void) -{ - /* obsolete - no use */ -} -static inline void rb_enable_super(void) -{ - rb_warning("rb_enable_super() is obsolete"); -} -#define rb_disable_super(klass, name) rb_disable_super() -#define rb_enable_super(klass, name) rb_enable_super() #define HAVE_RB_DEFINE_ALLOC_FUNC 1 typedef VALUE (*rb_alloc_func_t)(VALUE); void rb_define_alloc_func(VALUE, rb_alloc_func_t); void rb_undef_alloc_func(VALUE); rb_alloc_func_t rb_get_alloc_func(VALUE); -NORETURN(DEPRECATED(void rb_clear_cache(void))); void rb_clear_constant_cache(void); void rb_clear_method_cache_by_class(VALUE); void rb_alias(VALUE, ID, ID); @@ -527,8 +514,6 @@ int rb_path_check(const char*); int rb_env_path_tainted(void); VALUE rb_env_clear(void); VALUE rb_hash_size(VALUE); -DEPRECATED(int rb_hash_iter_lev(VALUE)); -DEPRECATED(VALUE rb_hash_ifnone(VALUE)); /* io.c */ #define rb_defout rb_stdout RUBY_EXTERN VALUE rb_fs; @@ -777,8 +762,6 @@ VALUE rb_str_replace(VALUE, VALUE); VALUE rb_str_inspect(VALUE); VALUE rb_str_dump(VALUE); VALUE rb_str_split(VALUE, const char*); -NORETURN(DEPRECATED(void rb_str_associate(VALUE, VALUE))); -NORETURN(DEPRECATED(VALUE rb_str_associated(VALUE))); void rb_str_setter(VALUE, ID, VALUE*); VALUE rb_str_intern(VALUE); VALUE rb_sym_to_s(VALUE); @@ -886,7 +869,6 @@ VALUE rb_struct_getmember(VALUE, ID); VALUE rb_struct_s_members(VALUE); VALUE rb_struct_members(VALUE); VALUE rb_struct_size(VALUE s); -DEPRECATED(const VALUE *rb_struct_ptr(VALUE s)); VALUE rb_struct_alloc_noinit(VALUE); VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...); VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...); @@ -973,10 +955,6 @@ int rb_frame_method_id_and_class(ID *idp, VALUE *klassp); VALUE rb_make_backtrace(void); VALUE rb_make_exception(int, const VALUE*); -/* deprecated */ -NORETURN(DEPRECATED(void rb_frame_pop(void))); - - RUBY_SYMBOL_EXPORT_END #if defined(__cplusplus) @@ -126,18 +126,6 @@ str_associated(VALUE str) return rb_ivar_lookup(str, id_associated, Qfalse); } -void -rb_str_associate(VALUE str, VALUE add) -{ - DEPRECATED_INTERNAL_FEATURE("rb_str_associate()"); -} - -VALUE -rb_str_associated(VALUE str) -{ - DEPRECATED_INTERNAL_FEATURE("rb_str_associated()"); -} - /* * call-seq: * arr.pack( aTemplateString ) -> aBinaryString @@ -1126,12 +1126,6 @@ rb_struct_size(VALUE s) return LONG2FIX(RSTRUCT_LEN(s)); } -const VALUE* -rb_struct_ptr(VALUE s) -{ - return RSTRUCT_CONST_PTR(s); -} - /* * call-seq: * struct.dig(key, ...) -> object @@ -544,13 +544,6 @@ rb_vm_rewind_cfp(rb_thread_t *th, rb_control_frame_t *cfp) } } -/* obsolete */ -void -rb_frame_pop(void) -{ - DEPRECATED_INTERNAL_FEATURE("rb_frame_pop()"); -} - /* at exit */ void diff --git a/vm_method.c b/vm_method.c index dd5b921d7e..00b2763e5d 100644 --- a/vm_method.c +++ b/vm_method.c @@ -81,12 +81,6 @@ rb_class_clear_method_cache(VALUE klass, VALUE arg) } void -rb_clear_cache(void) -{ - DEPRECATED_INTERNAL_FEATURE("rb_clear_cache()"); -} - -void rb_clear_constant_cache(void) { INC_GLOBAL_CONSTANT_STATE(); |