[前][次][番号順一覧][スレッド一覧]

ruby-changes:30823

From: nobu <ko1@a...>
Date: Tue, 10 Sep 2013 12:39:40 +0900 (JST)
Subject: [ruby-changes:30823] nobu:r42902 (trunk): vm_method.c: constify

nobu	2013-09-10 12:39:28 +0900 (Tue, 10 Sep 2013)

  New Revision: 42902

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42902

  Log:
    vm_method.c: constify
    
    * vm_method.c (rb_resolve_refined_method): constify.

  Modified files:
    trunk/method.h
    trunk/vm_method.c
Index: method.h
===================================================================
--- method.h	(revision 42901)
+++ method.h	(revision 42902)
@@ -115,7 +115,7 @@ rb_method_entry_t *rb_method_entry(VALUE https://github.com/ruby/ruby/blob/trunk/method.h#L115
 rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
 void rb_add_refined_method_entry(VALUE refined_class, ID mid);
 rb_method_entry_t *rb_resolve_refined_method(VALUE refinements,
-					     rb_method_entry_t *me,
+					     const rb_method_entry_t *me,
 					     VALUE *defined_class_ptr);
 rb_method_entry_t *rb_method_entry_with_refinements(VALUE klass, ID id,
 						    VALUE *defined_class_ptr);
Index: vm_method.c
===================================================================
--- vm_method.c	(revision 42901)
+++ vm_method.c	(revision 42902)
@@ -598,7 +598,7 @@ rb_method_entry(VALUE klass, ID id, VALU https://github.com/ruby/ruby/blob/trunk/vm_method.c#L598
 
 static rb_method_entry_t *
 get_original_method_entry(VALUE refinements,
-			  rb_method_entry_t *me,
+			  const rb_method_entry_t *me,
 			  VALUE *defined_class_ptr)
 {
     if (me->def->body.orig_me) {
@@ -614,7 +614,7 @@ get_original_method_entry(VALUE refineme https://github.com/ruby/ruby/blob/trunk/vm_method.c#L614
 }
 
 rb_method_entry_t *
-rb_resolve_refined_method(VALUE refinements, rb_method_entry_t *me,
+rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me,
 			  VALUE *defined_class_ptr)
 {
     if (me && me->def->type == VM_METHOD_TYPE_REFINED) {
@@ -637,7 +637,7 @@ rb_resolve_refined_method(VALUE refineme https://github.com/ruby/ruby/blob/trunk/vm_method.c#L637
 	}
     }
     else {
-	return me;
+	return (rb_method_entry_t *)me;
     }
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]