From 54aebe6785ef1c83380584b5c05610d555a4d4a9 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 30 May 2015 18:30:42 +0000 Subject: * method.h, vm_method.c (rb_free_method_entry): constify a parameter. * vm_method.c (rb_unlink_method_entry): constify a parameter. * vm_core.h: remove useless declaration about rb_unlink_method_entry(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ method.h | 2 +- vm_core.h | 1 - vm_method.c | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1574fd22ea..39654e31ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun May 31 03:26:58 2015 Koichi Sasada + + * method.h, vm_method.c (rb_free_method_entry): constify a parameter. + + * vm_method.c (rb_unlink_method_entry): constify a parameter. + + * vm_core.h: remove useless declaration about rb_unlink_method_entry(). + Sat May 30 18:05:02 2015 NAKAMURA Usaku * lib/tempfile.rb (Remover#call): fixed wrong condition. introduced at diff --git a/method.h b/method.h index 3ddd633c8e..db5eafd8f4 100644 --- a/method.h +++ b/method.h @@ -140,7 +140,7 @@ VALUE rb_mod_method_location(VALUE mod, ID id); VALUE rb_obj_method_location(VALUE obj, ID id); void rb_mark_method_entry(const rb_method_entry_t *me); -void rb_free_method_entry(rb_method_entry_t *me); +void rb_free_method_entry(const rb_method_entry_t *me); void rb_sweep_method_entry(void *vm); #endif /* METHOD_H */ diff --git a/vm_core.h b/vm_core.h index 6fead588a5..993b65ee8a 100644 --- a/vm_core.h +++ b/vm_core.h @@ -953,7 +953,6 @@ void rb_vm_gvl_destroy(rb_vm_t *vm); VALUE rb_vm_call(rb_thread_t *th, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_method_entry_t *me, VALUE defined_class); -void rb_unlink_method_entry(rb_method_entry_t *me); void rb_gc_mark_unlinked_live_method_entries(void *pvm); void rb_thread_start_timer_thread(void); diff --git a/vm_method.c b/vm_method.c index e3d6b41a31..cefc1469b7 100644 --- a/vm_method.c +++ b/vm_method.c @@ -193,10 +193,10 @@ release_method_definition(rb_method_definition_t *def) } void -rb_free_method_entry(rb_method_entry_t *me) +rb_free_method_entry(const rb_method_entry_t *me) { release_method_definition(me->def); - xfree(me); + xfree((void *)me); } static inline rb_method_entry_t *search_method(VALUE klass, ID id, VALUE *defined_class_ptr); -- cgit v1.2.3