mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval_method.ci (rb_get_alloc_func): new function to get allocation
function. * include/ruby/intern.h (rb_alloc_func_t): declared. (rb_define_alloc_func): declared. (rb_marshal_define_compat): declared. * range.c: use T_STRUCT for Range. * inits.c: move Init_marshal() prior to Init_Range() because Init_Range calls rb_marshal_define_compat which needs marshal's compat_allocator_tbl initialized. * marshal.c: support marshal format compatibility layer designed for marshaling T_STRUCT Range using T_OBJECT format. (rb_marshal_define_compat): defined. [ruby-dev:31710] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
22bcf22ea4
commit
2a37152f3f
6 changed files with 279 additions and 52 deletions
|
@ -219,8 +219,10 @@ void rb_remove_method(VALUE, const char*);
|
|||
#define rb_disable_super(klass, name) ((void)0)
|
||||
#define rb_enable_super(klass, name) ((void)0)
|
||||
#define HAVE_RB_DEFINE_ALLOC_FUNC 1
|
||||
void rb_define_alloc_func(VALUE, VALUE (*)(VALUE));
|
||||
typedef VALUE (*rb_alloc_func_t)(VALUE);
|
||||
void rb_define_alloc_func(VALUE, rb_alloc_func_t);
|
||||
void rb_undef_alloc_func(VALUE);
|
||||
rb_alloc_func_t rb_get_alloc_func(VALUE);
|
||||
void rb_clear_cache(void);
|
||||
void rb_clear_cache_by_class(VALUE);
|
||||
void rb_alias(VALUE, ID, ID);
|
||||
|
@ -356,6 +358,7 @@ void rb_write_error2(const char*, long);
|
|||
/* marshal.c */
|
||||
VALUE rb_marshal_dump(VALUE, VALUE);
|
||||
VALUE rb_marshal_load(VALUE);
|
||||
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
|
||||
/* numeric.c */
|
||||
void rb_num_zerodiv(void);
|
||||
VALUE rb_num_coerce_bin(VALUE, VALUE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue