mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
include/ruby/backward/2/rmodule.h: deprecate
Only one function in only one file uses contents of this public header. That is not a wise idea. Let's just free the header's soul.
This commit is contained in:
parent
2038cc6cab
commit
5ca44076f4
Notes:
git
2020-08-27 16:42:31 +09:00
3 changed files with 9 additions and 4 deletions
6
class.c
6
class.c
|
@ -1027,7 +1027,7 @@ include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super)
|
|||
VALUE super_class = RCLASS_SUPER(c);
|
||||
|
||||
// invalidate inline method cache
|
||||
tbl = RMODULE_M_TBL(module);
|
||||
tbl = RCLASS_M_TBL(module);
|
||||
if (tbl && rb_id_table_size(tbl)) {
|
||||
if (search_super) { // include
|
||||
if (super_class && !RB_TYPE_P(super_class, T_MODULE)) {
|
||||
|
@ -1070,11 +1070,11 @@ include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super)
|
|||
VALUE refined_class =
|
||||
rb_refinement_module_get_refined_class(klass);
|
||||
|
||||
rb_id_table_foreach(RMODULE_M_TBL(module), add_refined_method_entry_i, (void *)refined_class);
|
||||
rb_id_table_foreach(RCLASS_M_TBL(module), add_refined_method_entry_i, (void *)refined_class);
|
||||
FL_SET(c, RMODULE_INCLUDED_INTO_REFINEMENT);
|
||||
}
|
||||
|
||||
tbl = RMODULE_CONST_TBL(module);
|
||||
tbl = RCLASS_CONST_TBL(module);
|
||||
if (tbl && rb_id_table_size(tbl)) constant_changed = 1;
|
||||
skip:
|
||||
module = RCLASS_SUPER(module);
|
||||
|
|
|
@ -28,4 +28,10 @@
|
|||
#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
|
||||
#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
|
||||
#define RMODULE_SUPER(m) RCLASS_SUPER(m)
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# warning RMODULE_* macros are deprecated
|
||||
#elif defined(_MSC_VER)
|
||||
# pragma message("warning: RMODULE_* macros are deprecated")
|
||||
#endif
|
||||
#endif /* RUBY_BACKWARD2_RMODULE_H */
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
#include "ruby/backward/2/assume.h"
|
||||
#include "ruby/backward/2/inttypes.h"
|
||||
#include "ruby/backward/2/limits.h"
|
||||
#include "ruby/backward/2/rmodule.h"
|
||||
|
||||
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue