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

ruby-changes:42220

From: nobu <ko1@a...>
Date: Sat, 26 Mar 2016 10:34:40 +0900 (JST)
Subject: [ruby-changes:42220] nobu:r54294 (trunk): compile.c: explicit address

nobu	2016-03-26 10:34:35 +0900 (Sat, 26 Mar 2016)

  New Revision: 54294

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54294

  Log:
    compile.c: explicit address
    
    * compile.c (prepare_compile_error): add & to explicit address of
      functions to suppress warnings by old VC.

  Modified files:
    trunk/compile.c
    trunk/tool/mk_call_iseq_optimized.rb
Index: compile.c
===================================================================
--- compile.c	(revision 54293)
+++ compile.c	(revision 54294)
@@ -330,13 +330,13 @@ static compile_error_func https://github.com/ruby/ruby/blob/trunk/compile.c#L330
 prepare_compile_error(rb_iseq_t *iseq)
 {
     VALUE err_info = ISEQ_COMPILE_DATA(iseq)->err_info;
-    if (compile_debug) return rb_compile_bug_str;
+    if (compile_debug) return &rb_compile_bug_str;
     if (NIL_P(err_info)) {
 	err_info = rb_exc_new_cstr(rb_eSyntaxError, "");
 	RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, err_info);
     }
     rb_set_errinfo(err_info);
-    return append_compile_error;
+    return &append_compile_error;
 }
 
 #define COMPILE_ERROR prepare_compile_error(iseq)
Index: tool/mk_call_iseq_optimized.rb
===================================================================
--- tool/mk_call_iseq_optimized.rb	(revision 54293)
+++ tool/mk_call_iseq_optimized.rb	(revision 54294)
@@ -40,10 +40,10 @@ static inline vm_call_handler https://github.com/ruby/ruby/blob/trunk/tool/mk_call_iseq_optimized.rb#L40
 vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size)
 {
     if (UNLIKELY(ci->flag & VM_CALL_TAILCALL)) {
-	return vm_call_iseq_setup_tailcall_0start;
+	return &vm_call_iseq_setup_tailcall_0start;
     }
     else if (0) { /* to disable optimize */
-        return vm_call_iseq_setup_normal_0start;
+        return &vm_call_iseq_setup_normal_0start;
     }
     else {
 	if (param_size <= #{P.end} &&
@@ -51,7 +51,7 @@ vm_call_iseq_setup_func(const struct rb_ https://github.com/ruby/ruby/blob/trunk/tool/mk_call_iseq_optimized.rb#L51
 	    VM_ASSERT(local_size != 0);
 	    return vm_call_iseq_handlers[param_size][local_size-1];
 	}
-	return vm_call_iseq_setup_normal_0start;
+	return &vm_call_iseq_setup_normal_0start;
     }
 }
 
@@ -62,10 +62,10 @@ static inline vm_call_handler https://github.com/ruby/ruby/blob/trunk/tool/mk_call_iseq_optimized.rb#L62
 vm_call_iseq_setup_func(const struct rb_call_info *ci, struct rb_call_cache *cc)
 {
     if (UNLIKELY(ci->flag & VM_CALL_TAILCALL)) {
-	return vm_call_iseq_setup_tailcall_0start;
+	return &vm_call_iseq_setup_tailcall_0start;
     }
     else {
-        return vm_call_iseq_setup_normal_0start;
+        return &vm_call_iseq_setup_normal_0start;
     }
 }
 #endif

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

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