Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
backward.h
Go to the documentation of this file.
1#ifndef RUBY_RUBY_BACKWARD_H
2#define RUBY_RUBY_BACKWARD_H 1
3
4#define RClass RClassDeprecated
5#ifndef __cplusplus
6DEPRECATED_TYPE(("RClass is internal use only"),
7struct RClass {
8 struct RBasic basic;
9});
10#endif
11
12#define DECLARE_DEPRECATED_FEATURE(ver, func) \
13 NORETURN(ERRORFUNC(("deprecated since "#ver), DEPRECATED(void func(void))))
14
15/* eval.c */
16DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super);
17DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super);
18
19/* hash.c */
20DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev);
21DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone);
22
23/* string.c */
24DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate);
25DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated);
26
27/* variable.c */
28DEPRECATED(void rb_autoload(VALUE, ID, const char*));
29
30/* vm.c */
31DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache);
32DECLARE_DEPRECATED_FEATURE(2.2, rb_frame_pop);
33
34#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func) \
35 NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
36
37/* eval.c */
38NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)));
40
41/* error.c */
43DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_with_enc);
44DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_append);
45
46/* gc.c */
47DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_gc_call_finalizer_at_exit);
48
49/* signal.c */
51
52/* struct.c */
54
55/* thread.c */
57
58/* variable.c */
61
62/* from version.c */
63#ifndef RUBY_SHOW_COPYRIGHT_TO_DIE
64# define RUBY_SHOW_COPYRIGHT_TO_DIE 1
65#endif
66#if RUBY_SHOW_COPYRIGHT_TO_DIE
67/* for source code backward compatibility */
68DEPRECATED(static inline int ruby_show_copyright_to_die(int));
69static inline int
70ruby_show_copyright_to_die(int exitcode)
71{
73 return exitcode;
74}
75#define ruby_show_copyright() /* defer EXIT_SUCCESS */ \
76 (exit(ruby_show_copyright_to_die(EXIT_SUCCESS)))
77#endif
78
79#endif /* RUBY_RUBY_BACKWARD_H */
DEPRECATED(void rb_autoload(VALUE, ID, const char *))
#define ruby_show_copyright()
Definition: backward.h:75
#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func)
Definition: backward.h:34
#define DECLARE_DEPRECATED_FEATURE(ver, func)
Definition: backward.h:12
NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)))
DEPRECATED_TYPE(("RClass is internal use only"), struct RClass { struct RBasic basic;})
unsigned long VALUE
unsigned long ID
#define ERRORFUNC(mesg, x)
VALUE rb_mod_const_missing(VALUE klass, VALUE name)
Definition: variable.c:1739
RUBY_FUNC_EXPORTED void rb_autoload(VALUE mod, ID id, const char *file)
Definition: variable.c:1928