mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
a976acd603
* include/ruby/backward.h (rb_frame_method_id_and_class): we had labeled `rb_frame_method_id_and_class()` as deprecated because MRI internal doesn't use it, but we found there are user of this API in external C-extensions. Now we don't have proper alternative API and no time to make alternative API, so I remove "deprecated" label. [Bug #15300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
69 lines
2 KiB
C
69 lines
2 KiB
C
#ifndef RUBY_RUBY_BACKWARD_H
|
|
#define RUBY_RUBY_BACKWARD_H 1
|
|
|
|
#define RClass RClassDeprecated
|
|
#ifndef __cplusplus
|
|
DEPRECATED_TYPE(("RClass is internal use only"),
|
|
struct RClass {
|
|
struct RBasic basic;
|
|
});
|
|
#endif
|
|
|
|
#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);
|
|
|
|
/* 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))))
|
|
|
|
/* eval.c */
|
|
NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)));
|
|
|
|
/* 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);
|
|
|
|
/* struct.c */
|
|
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_struct_ptr);
|
|
|
|
/* variable.c */
|
|
DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_generic_ivar_table);
|
|
NORETURN(ERRORFUNC(("internal function"), VALUE rb_mod_const_missing(VALUE, VALUE)));
|
|
|
|
/* from version.c */
|
|
#ifndef RUBY_SHOW_COPYRIGHT_TO_DIE
|
|
# define RUBY_SHOW_COPYRIGHT_TO_DIE 1
|
|
#endif
|
|
#if RUBY_SHOW_COPYRIGHT_TO_DIE
|
|
/* for source code backward compatibility */
|
|
DEPRECATED(static inline int ruby_show_copyright_to_die(int));
|
|
static inline int
|
|
ruby_show_copyright_to_die(int exitcode)
|
|
{
|
|
ruby_show_copyright();
|
|
return exitcode;
|
|
}
|
|
#define ruby_show_copyright() /* defer EXIT_SUCCESS */ \
|
|
(exit(ruby_show_copyright_to_die(EXIT_SUCCESS)))
|
|
#endif
|
|
|
|
#endif /* RUBY_RUBY_BACKWARD_H */
|