Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
backward.h
Go to the documentation of this file.
1#ifndef RUBY_RUBY_BACKWARD_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RUBY_RUBY_BACKWARD_H 1
11#include "ruby/internal/value.h"
14
15#define DECLARE_DEPRECATED_FEATURE(ver, func) \
16 NORETURN(ERRORFUNC(("deprecated since "#ver), DEPRECATED(void func(void))))
17
18/* eval.c */
19DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super);
20DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super);
21
22/* hash.c */
23DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev);
24DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone);
25
26/* string.c */
27DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate);
28DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated);
29
30/* variable.c */
31DEPRECATED(void rb_autoload(VALUE, ID, const char*));
32
33/* vm.c */
34DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache);
35DECLARE_DEPRECATED_FEATURE(2.2, rb_frame_pop);
36
37#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func) \
38 NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
39
40/* eval.c */
41NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)));
43
44/* error.c */
46DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_with_enc);
47DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_append);
48
49/* gc.c */
50DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_gc_call_finalizer_at_exit);
51
52/* signal.c */
54
55/* struct.c */
57
58/* thread.c */
60
61/* variable.c */
63NORETURN(ERRORFUNC(("internal function"), VALUE rb_mod_const_missing(VALUE, VALUE)));
64
65/* from version.c */
66#if defined(RUBY_SHOW_COPYRIGHT_TO_DIE) && !!(RUBY_SHOW_COPYRIGHT_TO_DIE+0)
67/* for source code backward compatibility */
68RBIMPL_ATTR_DEPRECATED(("since 2.4"))
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 */
Various attribute-related macros.
#define NORETURN(x)
Definition: attributes.h:152
#define ERRORFUNC(mesg, x)
Definition: attributes.h:90
#define DEPRECATED(x)
Definition: attributes.h:57
VALUE rb_mod_const_missing(VALUE, VALUE)
Definition: variable.c:1960
#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func)
Definition: backward.h:37
#define DECLARE_DEPRECATED_FEATURE(ver, func)
Definition: backward.h:15
void rb_frozen_class_p(VALUE)
void rb_autoload(VALUE, ID, const char *)
Definition: variable.c:2149
#define RBIMPL_ATTR_DEPRECATED(msg)
Wraps (or simulates) [[deprecated]]
Definition: deprecated.h:60
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:138
Interpreter embedding APIs.
Defines VALUE and ID.
unsigned long VALUE
Definition: value.h:38
unsigned long ID
Definition: value.h:39