aboutsummaryrefslogtreecommitdiffstats
path: root/method.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-25 07:59:23 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-25 07:59:23 +0000
commit8cab598c25b618eb4323752df13d2b28f50b7cc3 (patch)
treebbf98eaecab76b4181bb4b328546d7b0e30715c2 /method.h
parent39a5ad3460245a090096dfb12883eb1747c44e5d (diff)
downloadruby-8cab598c25b618eb4323752df13d2b28f50b7cc3.tar.gz
* vm_method.c: make a rb_method_definition_t data (def) *after* making
a rb_method_entry_t data (me). Normally, `me' points `def'. Some Ruby objects pointed from `def' and objects are marked by `me' (mark_method_entry() in gc.c). However, `def' is built before making a `me', then nobody can mark objects pointed from `def' before making (and pointing from) `me'. I hope this patch solve #11244. * vm_method.c: remove `rb_' prefix from some static functions. * method.h (rb_method_entry_create): constify * gc.c (mark_method_entry): add checking `def' and `def->body.iseq.iseqptr' availability because they can be NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r--method.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/method.h b/method.h
index 4badd06db5..87c4ba314e 100644
--- a/method.h
+++ b/method.h
@@ -185,7 +185,7 @@ VALUE rb_obj_method_location(VALUE obj, ID id);
void rb_free_method_entry(const rb_method_entry_t *me);
void rb_sweep_method_entry(void *vm);
-rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, rb_method_definition_t *def);
+rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);