Ruby  2.5.0dev(2017-10-22revision60238)
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 /* complex.c */
16 DECLARE_DEPRECATED_FEATURE(2.2, rb_complex_set_real);
17 DECLARE_DEPRECATED_FEATURE(2.2, rb_complex_set_imag);
18 
19 /* eval.c */
20 DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super);
21 DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super);
22 
23 /* hash.c */
24 DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev);
25 DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone);
26 
27 /* string.c */
28 DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate);
29 DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated);
30 
31 /* variable.c */
32 DEPRECATED(void rb_autoload(VALUE, ID, const char*));
33 
34 /* vm.c */
35 DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache);
36 DECLARE_DEPRECATED_FEATURE(2.2, rb_frame_pop);
37 
38 #define DECLARE_DEPRECATED_INTERNAL_FEATURE(func) \
39  NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
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 /* struct.c */
48 
49 /* variable.c */
50 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_generic_ivar_table);
51 
52 /* from version.c */
53 #ifndef RUBY_SHOW_COPYRIGHT_TO_DIE
54 # define RUBY_SHOW_COPYRIGHT_TO_DIE 1
55 #endif
56 #if RUBY_SHOW_COPYRIGHT_TO_DIE
57 /* for source code backward compatibility */
58 DEPRECATED(static inline int ruby_show_copyright_to_die(int));
59 static inline int
60 ruby_show_copyright_to_die(int exitcode)
61 {
63  return exitcode;
64 }
65 #define ruby_show_copyright() /* defer EXIT_SUCCESS */ \
66  (exit(ruby_show_copyright_to_die(EXIT_SUCCESS)))
67 #endif
68 
69 #endif /* RUBY_RUBY_BACKWARD_H */
DEPRECATED_TYPE(("RClass is internal use only"), struct RClass { struct RBasic basic;})
void rb_autoload(VALUE mod, ID id, const char *file)
Definition: variable.c:1886
#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func)
Definition: backward.h:38
Definition: ruby.h:854
#define DECLARE_DEPRECATED_FEATURE(ver, func)
Definition: backward.h:12
unsigned long ID
Definition: ruby.h:86
unsigned long VALUE
Definition: ruby.h:85
DEPRECATED(void rb_autoload(VALUE, ID, const char *))
#define ruby_show_copyright()
Definition: backward.h:65