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

ruby-changes:26250

From: nobu <ko1@a...>
Date: Tue, 11 Dec 2012 12:37:27 +0900 (JST)
Subject: [ruby-changes:26250] nobu:r38307 (trunk): probes_helper.h: RUBY_DTRACE_HOOK

nobu	2012-12-11 12:37:19 +0900 (Tue, 11 Dec 2012)

  New Revision: 38307

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

  Log:
    probes_helper.h: RUBY_DTRACE_HOOK
    
    * probes_helper.h (RUBY_DTRACE_HOOK): surround with do..while.
    
    * vm.c (vm_exec): supply semicolon.

  Modified files:
    trunk/probes_helper.h
    trunk/vm.c

Index: probes_helper.h
===================================================================
--- probes_helper.h	(revision 38306)
+++ probes_helper.h	(revision 38307)
@@ -7,6 +7,7 @@
 VALUE rb_class_path_no_cache(VALUE _klass);
 
 #define RUBY_DTRACE_HOOK(name, th, klazz, id) \
+do { \
     if (RUBY_DTRACE_##name##_ENABLED()) { \
 	VALUE _klass = (klazz); \
 	VALUE _id = (id); \
@@ -49,6 +50,7 @@
 	    } \
 	} \
     } \
+} while (0)
 
 #define RUBY_DTRACE_METHOD_ENTRY_HOOK(th, klass, id) \
     RUBY_DTRACE_HOOK(METHOD_ENTRY, th, klass, id)
Index: vm.c
===================================================================
--- vm.c	(revision 38306)
+++ vm.c	(revision 38307)
@@ -1359,7 +1359,7 @@
 
 	    switch (VM_FRAME_TYPE(th->cfp)) {
 	      case VM_FRAME_MAGIC_METHOD:
-		RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0)
+		RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
 		EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, th->cfp->self, 0, 0, Qnil);
 		break;
 	      case VM_FRAME_MAGIC_BLOCK:

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

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