mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
internal.h: moved RClass
* internal.h (struct RClass): moved from ruby/ruby.h to hide the internals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9d10f9ee8f
commit
1f22556040
4 changed files with 22 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Jul 28 10:32:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* internal.h (struct RClass): moved from ruby/ruby.h to hide the
|
||||||
|
internals.
|
||||||
|
|
||||||
Tue Jul 28 08:48:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jul 28 08:48:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in (RUBY_TYPE_ATTRIBUTE): attribute declaration for
|
* configure.in (RUBY_TYPE_ATTRIBUTE): attribute declaration for
|
||||||
|
|
|
@ -38,6 +38,9 @@ extern "C" {
|
||||||
#ifndef DEPRECATED_BY
|
#ifndef DEPRECATED_BY
|
||||||
# define DEPRECATED_BY(n,x) DEPRECATED(x)
|
# define DEPRECATED_BY(n,x) DEPRECATED(x)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef DEPRECATED_TYPE
|
||||||
|
# define DEPRECATED_TYPE(mesg, decl) decl
|
||||||
|
#endif
|
||||||
#ifndef NOINLINE
|
#ifndef NOINLINE
|
||||||
# define NOINLINE(x) x
|
# define NOINLINE(x) x
|
||||||
#endif
|
#endif
|
||||||
|
@ -821,15 +824,11 @@ struct RObject {
|
||||||
RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : \
|
RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : \
|
||||||
ROBJECT(o)->as.heap.iv_index_tbl)
|
ROBJECT(o)->as.heap.iv_index_tbl)
|
||||||
|
|
||||||
/** @internal */
|
#define RClass RClassDeprecated
|
||||||
typedef struct rb_classext_struct rb_classext_t;
|
DEPRECATED_TYPE(("RClass is internal use only"),
|
||||||
|
|
||||||
struct RClass {
|
struct RClass {
|
||||||
struct RBasic basic;
|
struct RBasic basic;
|
||||||
VALUE super;
|
});
|
||||||
rb_classext_t *ptr;
|
|
||||||
struct st_table *m_tbl;
|
|
||||||
};
|
|
||||||
#define RCLASS_SUPER(c) rb_class_get_superclass(c)
|
#define RCLASS_SUPER(c) rb_class_get_superclass(c)
|
||||||
#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
|
#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
|
||||||
#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
|
#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
|
||||||
|
|
10
internal.h
10
internal.h
|
@ -479,6 +479,16 @@ struct rb_classext_struct {
|
||||||
rb_alloc_func_t allocator;
|
rb_alloc_func_t allocator;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct rb_classext_struct rb_classext_t;
|
||||||
|
|
||||||
|
#undef RClass
|
||||||
|
struct RClass {
|
||||||
|
struct RBasic basic;
|
||||||
|
VALUE super;
|
||||||
|
rb_classext_t *ptr;
|
||||||
|
struct st_table *m_tbl;
|
||||||
|
};
|
||||||
|
|
||||||
void rb_class_subclass_add(VALUE super, VALUE klass);
|
void rb_class_subclass_add(VALUE super, VALUE klass);
|
||||||
void rb_class_remove_from_super_subclasses(VALUE);
|
void rb_class_remove_from_super_subclasses(VALUE);
|
||||||
|
|
||||||
|
|
|
@ -584,6 +584,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
||||||
!endif
|
!endif
|
||||||
!if $(MSC_VER) >= 1300
|
!if $(MSC_VER) >= 1300
|
||||||
#define DEPRECATED(x) __declspec(deprecated) x
|
#define DEPRECATED(x) __declspec(deprecated) x
|
||||||
|
#define DEPRECATED_TYPE(mesg, x) __declspec(deprecated mesg) x
|
||||||
#define NOINLINE(x) __declspec(noinline) x
|
#define NOINLINE(x) __declspec(noinline) x
|
||||||
!endif
|
!endif
|
||||||
#define UNREACHABLE __assume(0)
|
#define UNREACHABLE __assume(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue