summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-25 06:03:53 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-25 06:03:53 +0000
commit9dc3a7d7a5aece71c2bad9d2ec185f2ef87245b6 (patch)
tree25a68c4386f5f36a9fc4b329868ae4f0052cf092
parent8ca58751c106d8d88ed4fe41306a389f4dd53b23 (diff)
* 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
-rw-r--r--ChangeLog10
-rw-r--r--class.c6
-rw-r--r--include/ruby/ruby.h1
-rw-r--r--method.h1
-rw-r--r--vm_method.c15
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 <ko1@atdot.net>
+
+ * 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@ruby-lang.org>
* 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
@@ -1253,12 +1253,6 @@ rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc
}
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);
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
@@ -97,21 +97,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)
{
struct unlinked_method_entry_list_entry *ume = ALLOC(struct unlinked_method_entry_list_entry);