diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-24 03:16:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-24 03:16:31 +0000 |
commit | 01195a202cb9fcc6ddb6cf793868e4c7d85292dc (patch) | |
tree | ad8dff3ebf9b5fd2b54068a7adf2510aa210634e /include | |
parent | a270e96a14b36dc70c560c22f1f31bda59c5dad0 (diff) | |
download | ruby-01195a202cb9fcc6ddb6cf793868e4c7d85292dc.tar.gz |
ruby.h: parent in rb_data_type_t
* ruby.h (rb_data_type_t): revert r48647 and revise parent member.
[ruby-core:66969] [Bug #10621]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/ruby.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 79093949a0..cd03125990 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -973,7 +973,7 @@ struct rb_data_type_struct { void *reserved[2]; /* For future extension. This array *must* be filled with ZERO. */ } function; - void *const reserved; + const rb_data_type_t *parent; void *data; /* This area can be used for any purpose by a programmer who define the type. */ VALUE flags; /* FL_WB_PROTECTED */ @@ -981,6 +981,7 @@ struct rb_data_type_struct { #define HAVE_TYPE_RB_DATA_TYPE_T 1 #define HAVE_RB_DATA_TYPE_T_FUNCTION 1 +#define HAVE_RB_DATA_TYPE_T_PARENT 1 struct RTypedData { struct RBasic basic; @@ -1009,6 +1010,7 @@ typedef void (*RUBY_DATA_FUNC)(void*); #endif VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC); VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *); +int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent); int rb_typeddata_is_kind_of(VALUE, const rb_data_type_t *); void *rb_check_typeddata(VALUE, const rb_data_type_t *); #define Check_TypedStruct(v,t) rb_check_typeddata((VALUE)(v),(t)) |