aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-12 12:16:29 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-12 12:16:29 +0000
commitb3abb691daa86e8336a3e2e426e2b2621651896b (patch)
treeae0f809cbc1549b3ede685052d8736932db383a4 /compile.c
parent2e2bd1c26b21ab3298b32f881bccebc14c7cac3d (diff)
downloadruby-b3abb691daa86e8336a3e2e426e2b2621651896b.tar.gz
hoist out rb_call_info_kw_arg_bytes to inline function
* vm_core.h (rb_call_info_kw_arg_bytes): extract from compile.c * compile.c (iseq_build_callinfo_from_hash): use above function This will be use for implementing iseq_memsize git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 637f56ffff..26ee3b24fa 100644
--- a/compile.c
+++ b/compile.c
@@ -5917,7 +5917,7 @@ iseq_build_callinfo_from_hash(rb_iseq_t *iseq, VALUE op)
if (!NIL_P(vkw_arg)) {
int i;
int len = RARRAY_LENINT(vkw_arg);
- size_t n = sizeof(rb_call_info_kw_arg_t) + sizeof(VALUE) * (len - 1);
+ size_t n = rb_call_info_kw_arg_bytes(len);
kw_arg = xmalloc(n);
kw_arg->keyword_len = len;