mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
11c8b83ab6
commit
1443776cc9
3 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
Tue May 19 11:18:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* include/ruby/ruby.h (Data_Make_Struct0): needs function pointer
|
||||
|
|
11
gc.c
11
gc.c
|
@ -1812,6 +1812,12 @@ rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FU
|
|||
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, void *datap, const rb_data_type_t *type)
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -1010,6 +1010,8 @@ typedef void (*RUBY_DATA_FUNC)(void*);
|
|||
# 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 *);
|
||||
|
|
Loading…
Reference in a new issue