aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--method.h2
-rw-r--r--vm_core.h1
-rw-r--r--vm_method.c4
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 <ko1@atdot.net>
+
+ * 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 <usa@ruby-lang.org>
* 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);