diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-18 05:22:13 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-18 05:22:13 +0000 |
commit | 588b73bca2f16f03710d531d64e3dc6a0050c2d7 (patch) | |
tree | 21c09160e9799ea78778093736a97d595e295f0a /vm_method.c | |
parent | 676c01bb36d39cf1c0085c4853c9dcbd3b908f35 (diff) | |
download | ruby-588b73bca2f16f03710d531d64e3dc6a0050c2d7.tar.gz |
* class.c (rb_define_frameless_method): rename from
rb_define_method_fast(). Defined method with this C API
does not make a method frame. It is bit lightweight than
ordinal C functions. Now only 0 or 1 argc are permitted.
* method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name
from VM_METHOD_TYPE_CFUNC_FAST.
* vm_insnhelper.c, vm_method.c: rename related functions.
* proc.c (rb_method_entry_arity): catch up above changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c index 303817ded8..095af7643b 100644 --- a/vm_method.c +++ b/vm_method.c @@ -96,13 +96,13 @@ rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_me } void -rb_add_method_cfunc_fast(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex) +rb_add_method_cfunc_frameless(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex) { 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_FAST, &opt, noex); + rb_add_method(klass, mid, VM_METHOD_TYPE_CFUNC_FRAMELESS, &opt, noex); } else { rb_define_notimplement_method_id(klass, mid, noex); @@ -318,7 +318,7 @@ rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_ def->body.iseq = (rb_iseq_t *)opts; break; case VM_METHOD_TYPE_CFUNC: - case VM_METHOD_TYPE_CFUNC_FAST: + case VM_METHOD_TYPE_CFUNC_FRAMELESS: def->body.cfunc = *(rb_method_cfunc_t *)opts; break; case VM_METHOD_TYPE_ATTRSET: |