ruby-changes:39332
From: nobu <ko1@a...>
Date: Tue, 28 Jul 2015 10:32:46 +0900 (JST)
Subject: [ruby-changes:39332] nobu:r51413 (trunk): internal.h: moved RClass
nobu 2015-07-28 10:32:15 +0900 (Tue, 28 Jul 2015) New Revision: 51413 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51413 Log: internal.h: moved RClass * internal.h (struct RClass): moved from ruby/ruby.h to hide the internals. Modified files: trunk/ChangeLog trunk/include/ruby/ruby.h trunk/internal.h trunk/win32/Makefile.sub Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 51412) +++ include/ruby/ruby.h (revision 51413) @@ -38,6 +38,9 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L38 #ifndef DEPRECATED_BY # define DEPRECATED_BY(n,x) DEPRECATED(x) #endif +#ifndef DEPRECATED_TYPE +# define DEPRECATED_TYPE(mesg, decl) decl +#endif #ifndef NOINLINE # define NOINLINE(x) x #endif @@ -821,15 +824,11 @@ struct RObject { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L824 RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : \ ROBJECT(o)->as.heap.iv_index_tbl) -/** @internal */ -typedef struct rb_classext_struct rb_classext_t; - +#define RClass RClassDeprecated +DEPRECATED_TYPE(("RClass is internal use only"), struct RClass { struct RBasic basic; - VALUE super; - rb_classext_t *ptr; - struct st_table *m_tbl; -}; +}); #define RCLASS_SUPER(c) rb_class_get_superclass(c) #define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m) #define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m) Index: ChangeLog =================================================================== --- ChangeLog (revision 51412) +++ ChangeLog (revision 51413) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Jul 28 10:32:09 2015 Nobuyoshi Nakada <nobu@r...> + + * internal.h (struct RClass): moved from ruby/ruby.h to hide the + internals. + Tue Jul 28 08:48:29 2015 Nobuyoshi Nakada <nobu@r...> * configure.in (RUBY_TYPE_ATTRIBUTE): attribute declaration for Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 51412) +++ win32/Makefile.sub (revision 51413) @@ -584,6 +584,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L584 !endif !if $(MSC_VER) >= 1300 #define DEPRECATED(x) __declspec(deprecated) x +#define DEPRECATED_TYPE(mesg, x) __declspec(deprecated mesg) x #define NOINLINE(x) __declspec(noinline) x !endif #define UNREACHABLE __assume(0) Index: internal.h =================================================================== --- internal.h (revision 51412) +++ internal.h (revision 51413) @@ -479,6 +479,16 @@ struct rb_classext_struct { https://github.com/ruby/ruby/blob/trunk/internal.h#L479 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_remove_from_super_subclasses(VALUE); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/