ruby-changes:25268
From: ko1 <ko1@a...>
Date: Thu, 25 Oct 2012 15:04:05 +0900 (JST)
Subject: [ruby-changes:25268] ko1:r37320 (trunk): * include/ruby/ruby.h, class.c: remove (revert)
ko1 2012-10-25 15:03:53 +0900 (Thu, 25 Oct 2012) New Revision: 37320 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37320 Log: * include/ruby/ruby.h, class.c: remove (revert) `rb_add_method_cfunc_frameless()' API. This API is not mature to become an offical API. For example, we can not use this API with `rb_define_private_method()'. * method.h, vm_method.c (rb_add_method_cfunc_frameless): removed. Modified files: trunk/ChangeLog trunk/class.c trunk/include/ruby/ruby.h trunk/method.h trunk/vm_method.c Index: method.h =================================================================== --- method.h (revision 37319) +++ method.h (revision 37320) @@ -92,7 +92,6 @@ #define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF) void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex); -void rb_add_method_cfunc_frameless(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex); rb_method_entry_t *rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_flag_t noex); rb_method_entry_t *rb_method_entry(VALUE klass, ID id, VALUE *define_class_ptr); Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 37319) +++ include/ruby/ruby.h (revision 37320) @@ -1261,7 +1261,6 @@ #define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func)) void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int); -void rb_define_frameless_method(VALUE,const char*,VALUE(*)(ANYARGS),int); void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int); void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int); Index: ChangeLog =================================================================== --- ChangeLog (revision 37319) +++ ChangeLog (revision 37320) @@ -1,3 +1,13 @@ +Thu Oct 25 15:00:08 2012 Koichi Sasada <ko1@a...> + + * include/ruby/ruby.h, class.c: remove (revert) + `rb_add_method_cfunc_frameless()' API. + This API is not mature to become an offical API. + For example, we can not use this API with + `rb_define_private_method()'. + + * method.h, vm_method.c (rb_add_method_cfunc_frameless): removed. + Thu Oct 25 13:35:07 2012 NAKAMURA Usaku <usa@r...> * tool/mkconfig.rb: remove string literal concatenation. Index: vm_method.c =================================================================== --- vm_method.c (revision 37319) +++ vm_method.c (revision 37320) @@ -97,21 +97,6 @@ } void -rb_add_method_cfunc_frameless(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex) -{ - if (argc < 0 || 1 < argc) rb_raise(rb_eArgError, "arity out of range: %d for 0..1", argc); - if (func != rb_f_notimplement) { - rb_method_cfunc_t opt; - opt.func = func; - opt.argc = argc; - rb_add_method(klass, mid, VM_METHOD_TYPE_CFUNC_FRAMELESS, &opt, noex); - } - else { - rb_define_notimplement_method_id(klass, mid, noex); - } -} - -void rb_unlink_method_entry(rb_method_entry_t *me) { struct unlinked_method_entry_list_entry *ume = ALLOC(struct unlinked_method_entry_list_entry); Index: class.c =================================================================== --- class.c (revision 37319) +++ class.c (revision 37320) @@ -1253,12 +1253,6 @@ } void -rb_define_frameless_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) -{ - rb_add_method_cfunc_frameless(klass, rb_intern(name), func, argc, NOEX_PUBLIC); -} - -void rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) { rb_add_method_cfunc(klass, rb_intern(name), func, argc, NOEX_PROTECTED); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/