Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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
6 DEPRECATED_TYPE(("RClass is internal use only"),
7 struct 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 */
16 DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super);
17 DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super);
18
19 /* hash.c */
20 DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev);
21 DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone);
22
23 /* string.c */
24 DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate);
25 DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated);
26
27 /* variable.c */
28 DEPRECATED(void rb_autoload(VALUE, ID, const char*));
29
30 /* vm.c */
31 DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache);
32 DECLARE_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 */
38 NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)));
39 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_exec_end_proc);
40
41 /* error.c */
42 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error);
43 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_with_enc);
44 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_append);
45
46 /* gc.c */
47 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_gc_call_finalizer_at_exit);
48
49 /* signal.c */
50 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_trap_exit);
51
52 /* struct.c */
53 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_struct_ptr);
54
55 /* thread.c */
56 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_clear_trace_func);
57
58 /* variable.c */
59 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_generic_ivar_table);
60 NORETURN(ERRORFUNC(("internal function"), VALUE rb_mod_const_missing(VALUE, VALUE)));
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 */
68 DEPRECATED(static inline int ruby_show_copyright_to_die(int));
69 static inline int
70 ruby_show_copyright_to_die(int exitcode)
71 {
72 ruby_show_copyright();
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 */
ID
unsigned long ID
Definition: ruby.h:103
NORETURN
NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)))
DECLARE_DEPRECATED_FEATURE
#define DECLARE_DEPRECATED_FEATURE(ver, func)
Definition: backward.h:12
VALUE
unsigned long VALUE
Definition: ruby.h:102
rb_autoload
RUBY_FUNC_EXPORTED void rb_autoload(VALUE mod, ID id, const char *file)
Definition: variable.c:1924
DEPRECATED
DEPRECATED(void rb_autoload(VALUE, ID, const char *))
ERRORFUNC
#define ERRORFUNC(mesg, x)
Definition: defines.h:52
ruby_show_copyright
#define ruby_show_copyright()
Definition: backward.h:75
DEPRECATED_TYPE
DEPRECATED_TYPE(("RClass is internal use only"), struct RClass { struct RBasic basic;})
DECLARE_DEPRECATED_INTERNAL_FEATURE
#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func)
Definition: backward.h:34
rb_mod_const_missing
VALUE rb_mod_const_missing(VALUE klass, VALUE name)
Definition: variable.c:1739
RClass
Definition: internal.h:1048