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

ruby-changes:25634

From: nobu <ko1@a...>
Date: Sat, 17 Nov 2012 02:02:49 +0900 (JST)
Subject: [ruby-changes:25634] nobu:r37691 (trunk): object.c: suppress warning

nobu	2012-11-17 02:02:39 +0900 (Sat, 17 Nov 2012)

  New Revision: 37691

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

  Log:
    object.c: suppress warning
    
    * object.c (rb_obj_alloc): suppress unused variable warning.
    
    * tool/gen_dummy_probes.rb: define dtrace disabling macro.

  Modified files:
    trunk/object.c
    trunk/tool/gen_dummy_probes.rb

Index: object.c
===================================================================
--- object.c	(revision 37690)
+++ object.c	(revision 37691)
@@ -1686,12 +1686,14 @@
 		 klass);
     }
 
+#if !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED
     if (RUBY_DTRACE_OBJECT_CREATE_ENABLED()) {
         const char * file = rb_sourcefile();
         RUBY_DTRACE_OBJECT_CREATE(rb_class2name(klass),
 				  file ? file : "",
 				  rb_sourceline());
     }
+#endif
 
     obj = (*allocator)(klass);
 
Index: tool/gen_dummy_probes.rb
===================================================================
--- tool/gen_dummy_probes.rb	(revision 37690)
+++ tool/gen_dummy_probes.rb	(revision 37691)
@@ -1,4 +1,5 @@
 #!/usr/bin/ruby
+# -*- coding: us-ascii -*-
 
 text = ARGF.read
 text.upcase!
@@ -7,7 +8,7 @@
 text.gsub!(/^#PRAGMA.*$/, '')
 
 # replace the provider section with the start of the header file
-text.gsub!(/PROVIDER RUBY \{/, "#ifndef\t_PROBES_H\n#define\t_PROBES_H")
+text.gsub!(/PROVIDER RUBY \{/, "#ifndef\t_PROBES_H\n#define\t_PROBES_H\n#define DTRACE_PROBES_DISABLED 1\n")
 
 # finish up the #ifndef sandwich
 text.gsub!(/\};/, "#endif\t/* _PROBES_H */")

Property changes on: tool/gen_dummy_probes.rb
___________________________________________________________________
Added: svn:executable
   + *


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

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