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

ruby-changes:30746

From: nobu <ko1@a...>
Date: Wed, 4 Sep 2013 16:18:33 +0900 (JST)
Subject: [ruby-changes:30746] nobu:r42825 (trunk): vm.c: prototype

nobu	2013-09-04 16:18:24 +0900 (Wed, 04 Sep 2013)

  New Revision: 42825

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

  Log:
    vm.c: prototype
    
    * vm.c (rb_next_class_sequence): use ANSI style definition and
      prorotype declaration, instead of old-K&R style.

  Modified files:
    trunk/class.c
    trunk/gc.c
    trunk/internal.h
    trunk/vm.c
    trunk/vm_method.c
Index: vm_method.c
===================================================================
--- vm_method.c	(revision 42824)
+++ vm_method.c	(revision 42825)
@@ -42,7 +42,8 @@ rb_clear_cache_by_class(VALUE klass) https://github.com/ruby/ruby/blob/trunk/vm_method.c#L42
     if (klass && klass != Qundef) {
 	if (klass == rb_cBasicObject || klass == rb_cObject || klass == rb_mKernel) {
 	    INC_VM_STATE_VERSION();
-	} else {
+	}
+	else {
 	    rb_class_clear_method_cache(klass);
 	}
     }
Index: gc.c
===================================================================
--- gc.c	(revision 42824)
+++ gc.c	(revision 42825)
@@ -1255,7 +1255,8 @@ obj_free(rb_objspace_t *objspace, VALUE https://github.com/ruby/ruby/blob/trunk/gc.c#L1255
 	if (RCLASS_EXT(obj)->subclasses) {
 	    if (BUILTIN_TYPE(obj) == T_MODULE) {
 		rb_class_detach_module_subclasses(obj);
-	    } else {
+	    }
+	    else {
 		rb_class_detach_subclasses(obj);
 	    }
 	    RCLASS_EXT(obj)->subclasses = NULL;
Index: class.c
===================================================================
--- class.c	(revision 42824)
+++ class.c	(revision 42825)
@@ -241,7 +241,8 @@ rewrite_cref_stack(NODE *node, VALUE old https://github.com/ruby/ruby/blob/trunk/class.c#L241
     if (node->nd_clss == old_klass) {
 	new_node = NEW_CREF(new_klass);
 	new_node->nd_next = node->nd_next;
-    } else {
+    }
+    else {
 	new_node = NEW_CREF(node->nd_clss);
 	new_node->nd_next = rewrite_cref_stack(node->nd_next, old_klass, new_klass);
     }
Index: internal.h
===================================================================
--- internal.h	(revision 42824)
+++ internal.h	(revision 42825)
@@ -635,7 +635,7 @@ void ruby_kill(rb_pid_t pid, int sig); https://github.com/ruby/ruby/blob/trunk/internal.h#L635
 void Init_native_thread(void);
 
 /* vm_insnhelper.h */
-vm_state_version_t rb_next_class_sequence();
+vm_state_version_t rb_next_class_sequence(void);
 
 /* vm.c */
 VALUE rb_obj_is_thread(VALUE obj);
Index: vm.c
===================================================================
--- vm.c	(revision 42824)
+++ vm.c	(revision 42825)
@@ -88,7 +88,7 @@ static vm_state_version_t ruby_vm_sequen https://github.com/ruby/ruby/blob/trunk/vm.c#L88
 #define PROCDEBUG 0
 
 vm_state_version_t
-rb_next_class_sequence()
+rb_next_class_sequence(void)
 {
     return NEXT_CLASS_SEQUENCE();
 }

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

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