[Groonga-commit] ranguba/rroonga at 14406d2 [master] Use n_XXX for the number of XXX name

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Oct 29 00:07:58 JST 2014


Kouhei Sutou	2014-10-29 00:07:58 +0900 (Wed, 29 Oct 2014)

  New Revision: 14406d29282e199231118c7967730171756be09e
  https://github.com/ranguba/rroonga/commit/14406d29282e199231118c7967730171756be09e

  Message:
    Use n_XXX for the number of XXX name
    
    Because we use the style in this project. "n_processors" also uses the
    style.

  Modified files:
    ext/groonga/extconf.rb

  Modified: ext/groonga/extconf.rb (+3 -3)
===================================================================
--- ext/groonga/extconf.rb    2014-10-29 00:07:05 +0900 (1df4791)
+++ ext/groonga/extconf.rb    2014-10-29 00:07:58 +0900 (4b60eb3)
@@ -171,11 +171,11 @@ def n_processors
   proc_file = "/proc/cpuinfo"
   use_processors = 1
   if File.exist?(proc_file)
-    cpu_nums = File.readlines(proc_file).grep(/^processor/).size
+    n_cpus = File.readlines(proc_file).grep(/^processor/).size
   elsif /darwin/ =~ RUBY_PLATFORM
-    cpu_nums = `sysctl -n hw.ncpu`
+    n_cpus = `sysctl -n hw.ncpu`
   end
-  use_processors = cpu_nums.to_i
+  use_processors = n_cpus.to_i
   use_processors
 end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index