ruby-changes:38455
From: nobu <ko1@a...>
Date: Tue, 19 May 2015 11:18:58 +0900 (JST)
Subject: [ruby-changes:38455] nobu:r50536 (trunk): ruby.h: add old names
nobu 2015-05-19 11:18:49 +0900 (Tue, 19 May 2015) New Revision: 50536 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50536 Log: ruby.h: add old names * include/ruby/ruby.h (rb_data_typed_object_alloc), (rb_data_object_alloc): add old names for source level backward compatibilities. * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc): add aliases for binary level backward compatibilities. Modified files: trunk/ChangeLog trunk/gc.c trunk/include/ruby/ruby.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 50535) +++ include/ruby/ruby.h (revision 50536) @@ -1010,6 +1010,8 @@ typedef void (*RUBY_DATA_FUNC)(void*); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1010 # define RUBY_UNTYPED_DATA_WARNING 0 # endif #endif +#define rb_data_object_alloc rb_data_object_wrap +#define rb_data_typed_object_alloc rb_data_typed_object_wrap VALUE rb_data_object_wrap(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC); VALUE rb_data_object_zalloc(VALUE,size_t,RUBY_DATA_FUNC,RUBY_DATA_FUNC); VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *); Index: ChangeLog =================================================================== --- ChangeLog (revision 50535) +++ ChangeLog (revision 50536) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue May 19 11:18:46 2015 Nobuyoshi Nakada <nobu@r...> + + * include/ruby/ruby.h (rb_data_typed_object_alloc), + (rb_data_object_alloc): add old names for source level backward + compatibilities. + + * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc): add + aliases for binary level backward compatibilities. + Tue May 19 09:54:44 2015 Nobuyoshi Nakada <nobu@r...> * include/ruby/ruby.h (Data_Make_Struct0): needs function pointer Index: gc.c =================================================================== --- gc.c (revision 50535) +++ gc.c (revision 50536) @@ -1812,6 +1812,12 @@ rb_data_object_wrap(VALUE klass, void *d https://github.com/ruby/ruby/blob/trunk/gc.c#L1812 return newobj_of(klass, T_DATA, (VALUE)dmark, (VALUE)dfree, (VALUE)datap); } +#undef rb_data_object_alloc +RUBY_ALIAS_FUNCTION(rb_data_object_alloc(VALUE klass, void *datap, + RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree), + rb_data_object_wrap, (klass, datap, dmark, dfree)); + + VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree) { @@ -1827,6 +1833,11 @@ rb_data_typed_object_wrap(VALUE klass, v https://github.com/ruby/ruby/blob/trunk/gc.c#L1833 return newobj_of(klass, T_DATA | (type->flags & ~T_MASK), (VALUE)type, (VALUE)1, (VALUE)datap); } +#undef rb_data_typed_object_alloc +RUBY_ALIAS_FUNCTION(rb_data_typed_object_alloc(VALUE klass, void *datap, + const rb_data_type_t *type), + rb_data_typed_object_wrap, (klass, datap, type)); + VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/