From 9dc3a7d7a5aece71c2bad9d2ec185f2ef87245b6 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 25 Oct 2012 06:03:53 +0000 Subject: * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++++ class.c | 6 ------ include/ruby/ruby.h | 1 - method.h | 1 - vm_method.c | 15 --------------- 5 files changed, 10 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a30a25cca..e1375b660d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Thu Oct 25 15:00:08 2012 Koichi Sasada + + * 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 * tool/mkconfig.rb: remove string literal concatenation. diff --git a/class.c b/class.c index 5320a4cf00..11c463e1e3 100644 --- a/class.c +++ b/class.c @@ -1252,12 +1252,6 @@ rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc rb_add_method_cfunc(klass, rb_intern(name), func, argc, NOEX_PUBLIC); } -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) { diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index e4afecca1f..7fe38a0f1d 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1261,7 +1261,6 @@ void rb_define_global_const(const char*,VALUE); #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); diff --git a/method.h b/method.h index 7f08ea261c..5d1afa6d41 100644 --- a/method.h +++ b/method.h @@ -92,7 +92,6 @@ struct unlinked_method_entry_list_entry { #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); diff --git a/vm_method.c b/vm_method.c index 8994fa2c2e..033c81f262 100644 --- a/vm_method.c +++ b/vm_method.c @@ -96,21 +96,6 @@ rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_me } } -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) { -- cgit v1.2.3