зеркало из https://github.com/github/ruby.git
Replaced deprecation macros
* DECLARE_DEPRECATED_FEATURE with RBIMPL_ATTR_DEPRECATED_SINCE * DECLARE_DEPRECATED_INTERNAL_FEATURE with RBIMPL_ATTR_INTERNAL And moved function declarations outside both.
This commit is contained in:
Родитель
ac2df89113
Коммит
0284e7ca62
|
@ -12,60 +12,53 @@
|
|||
#include "ruby/internal/interpreter.h"
|
||||
#include "ruby/backward/2/attributes.h"
|
||||
|
||||
#define DECLARE_DEPRECATED_FEATURE(ver, func) \
|
||||
NORETURN(ERRORFUNC(("deprecated since "#ver), DEPRECATED(void func(void))))
|
||||
#define RBIMPL_ATTR_DEPRECATED_SINCE(ver) RBIMPL_ATTR_DEPRECATED(("since " #ver))
|
||||
#define RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED(("internal function"))
|
||||
|
||||
/* eval.c */
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super);
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super);
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.2) void rb_disable_super();
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.2) void rb_enable_super();
|
||||
|
||||
/* hash.c */
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev);
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone);
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.2) void rb_hash_iter_lev();
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.2) void rb_hash_ifnone();
|
||||
|
||||
/* string.c */
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate);
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated);
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.2) void rb_str_associate();
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.2) void rb_str_associated();
|
||||
|
||||
/* variable.c */
|
||||
DEPRECATED(void rb_autoload(VALUE, ID, const char*));
|
||||
|
||||
/* vm.c */
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache);
|
||||
DECLARE_DEPRECATED_FEATURE(2.2, rb_frame_pop);
|
||||
|
||||
#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func) \
|
||||
NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.5) void rb_autoload();
|
||||
|
||||
/* eval.c */
|
||||
NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)));
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_exec_end_proc);
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.6) void rb_frozen_class_p();
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.7) void rb_exec_end_proc();
|
||||
|
||||
/* error.c */
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error);
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_with_enc);
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_append);
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.3) void rb_compile_error();
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.3) void rb_compile_error_with_enc();
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.3) void rb_compile_error_append();
|
||||
|
||||
/* gc.c */
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_gc_call_finalizer_at_exit);
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.7) void rb_gc_call_finalizer_at_exit();
|
||||
|
||||
/* signal.c */
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_trap_exit);
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.7) void rb_trap_exit();
|
||||
|
||||
/* struct.c */
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_struct_ptr);
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.4) void rb_struct_ptr();
|
||||
|
||||
/* thread.c */
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_clear_trace_func);
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.7) void rb_clear_trace_func();
|
||||
|
||||
/* variable.c */
|
||||
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_generic_ivar_table);
|
||||
NORETURN(ERRORFUNC(("internal function"), VALUE rb_mod_const_missing(VALUE, VALUE)));
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.7) void rb_generic_ivar_table();
|
||||
RBIMPL_ATTR_INTERNAL() RBIMPL_ATTR_DEPRECATED_SINCE(2.6) VALUE rb_mod_const_missing(VALUE, VALUE);
|
||||
|
||||
/* from version.c */
|
||||
#if defined(RUBY_SHOW_COPYRIGHT_TO_DIE) && !!(RUBY_SHOW_COPYRIGHT_TO_DIE+0)
|
||||
/* for source code backward compatibility */
|
||||
RBIMPL_ATTR_DEPRECATED(("since 2.4"))
|
||||
RBIMPL_ATTR_DEPRECATED_SINCE(2.4)
|
||||
static inline int
|
||||
ruby_show_copyright_to_die(int exitcode)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче