ruby-changes:45571
From: nobu <ko1@a...>
Date: Fri, 17 Feb 2017 14:45:54 +0900 (JST)
Subject: [ruby-changes:45571] nobu:r57643 (trunk): DEPRECATED_INTERNAL_FEATURE
nobu 2017-02-17 14:45:44 +0900 (Fri, 17 Feb 2017) New Revision: 57643 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57643 Log: DEPRECATED_INTERNAL_FEATURE * error.c (ruby_deprecated_internal_feature): renamed, to explicitly represent deprecation. * internal.h (DEPRECATED_INTERNAL_FEATURE): ditto. Modified files: trunk/error.c trunk/internal.h trunk/pack.c trunk/variable.c trunk/vm.c trunk/vm_method.c Index: internal.h =================================================================== --- internal.h (revision 57642) +++ internal.h (revision 57643) @@ -1083,8 +1083,9 @@ VALUE rb_name_err_new(VALUE mesg, VALUE https://github.com/ruby/ruby/blob/trunk/internal.h#L1083 rb_exc_raise(rb_name_err_new(mesg, recv, name)) #define rb_name_err_raise(mesg, recv, name) \ rb_name_err_raise_str(rb_fstring_cstr(mesg), (recv), (name)) -NORETURN(void ruby_only_for_internal_use(const char *)); -#define ONLY_FOR_INTERNAL_USE(func) ruby_only_for_internal_use(func) +NORETURN(void ruby_deprecated_internal_feature(const char *)); +#define DEPRECATED_INTERNAL_FEATURE(func) \ + (ruby_deprecated_internal_feature(func), UNREACHABLE) /* eval.c */ VALUE rb_refinement_module_get_refined_class(VALUE module); Index: vm_method.c =================================================================== --- vm_method.c (revision 57642) +++ vm_method.c (revision 57643) @@ -83,7 +83,7 @@ rb_class_clear_method_cache(VALUE klass, https://github.com/ruby/ruby/blob/trunk/vm_method.c#L83 void rb_clear_cache(void) { - ONLY_FOR_INTERNAL_USE("rb_clear_cache()"); + DEPRECATED_INTERNAL_FEATURE("rb_clear_cache()"); } void Index: error.c =================================================================== --- error.c (revision 57642) +++ error.c (revision 57643) @@ -132,23 +132,23 @@ rb_syntax_error_append(VALUE exc, VALUE https://github.com/ruby/ruby/blob/trunk/error.c#L132 void rb_compile_error_with_enc(const char *file, int line, void *enc, const char *fmt, ...) { - ONLY_FOR_INTERNAL_USE("rb_compile_error_with_enc()"); + DEPRECATED_INTERNAL_FEATURE("rb_compile_error_with_enc()"); } void rb_compile_error(const char *file, int line, const char *fmt, ...) { - ONLY_FOR_INTERNAL_USE("rb_compile_error()"); + DEPRECATED_INTERNAL_FEATURE("rb_compile_error()"); } void rb_compile_error_append(const char *fmt, ...) { - ONLY_FOR_INTERNAL_USE("rb_compile_error_append()"); + DEPRECATED_INTERNAL_FEATURE("rb_compile_error_append()"); } void -ruby_only_for_internal_use(const char *func) +ruby_deprecated_internal_feature(const char *func) { rb_print_backtrace(); rb_fatal("%s is only for internal use and deprecated; do not use", func); Index: vm.c =================================================================== --- vm.c (revision 57642) +++ vm.c (revision 57643) @@ -548,7 +548,7 @@ rb_vm_rewind_cfp(rb_thread_t *th, rb_con https://github.com/ruby/ruby/blob/trunk/vm.c#L548 void rb_frame_pop(void) { - ONLY_FOR_INTERNAL_USE("rb_frame_pop()"); + DEPRECATED_INTERNAL_FEATURE("rb_frame_pop()"); } /* at exit */ Index: variable.c =================================================================== --- variable.c (revision 57642) +++ variable.c (revision 57643) @@ -1007,8 +1007,7 @@ rb_generic_ivar_table(VALUE obj) https://github.com/ruby/ruby/blob/trunk/variable.c#L1007 return a.tbl; #else - ONLY_FOR_INTERNAL_USE("rb_generic_ivar_table()"); - UNREACHABLE; + DEPRECATED_INTERNAL_FEATURE("rb_generic_ivar_table()"); return 0; #endif } Index: pack.c =================================================================== --- pack.c (revision 57642) +++ pack.c (revision 57643) @@ -129,13 +129,13 @@ str_associated(VALUE str) https://github.com/ruby/ruby/blob/trunk/pack.c#L129 void rb_str_associate(VALUE str, VALUE add) { - ONLY_FOR_INTERNAL_USE("rb_str_associate()"); + DEPRECATED_INTERNAL_FEATURE("rb_str_associate()"); } VALUE rb_str_associated(VALUE str) { - ONLY_FOR_INTERNAL_USE("rb_str_associated()"); + DEPRECATED_INTERNAL_FEATURE("rb_str_associated()"); } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/