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

ruby-changes:22459

From: usa <ko1@a...>
Date: Thu, 9 Feb 2012 16:12:13 +0900 (JST)
Subject: [ruby-changes:22459] usa:r34508 (trunk): * test/ruby/memory_status.rb (Memory::Win32): 64bit support.

usa	2012-02-09 16:11:23 +0900 (Thu, 09 Feb 2012)

  New Revision: 34508

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

  Log:
    * test/ruby/memory_status.rb (Memory::Win32): 64bit support.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/memory_status.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34507)
+++ ChangeLog	(revision 34508)
@@ -1,3 +1,7 @@
+Thu Feb  9 16:10:34 2012  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/memory_status.rb (Memory::Win32): 64bit support.
+
 Thu Feb  9 16:08:55 2012  NAKAMURA Usaku  <usa@r...>
 
 	* ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
Index: test/ruby/memory_status.rb
===================================================================
--- test/ruby/memory_status.rb	(revision 34507)
+++ test/ruby/memory_status.rb	(revision 34508)
@@ -22,7 +22,11 @@
       extend DL::Importer
       dlload "kernel32.dll", "psapi.dll"
       include DL::Win32Types
-      typealias "SIZE_T", "DWORD"
+      if [nil].pack('p').bytesize == 8
+        typealias "SIZE_T", "DWORD64"
+      else
+        typealias "SIZE_T", "DWORD32"
+      end
 
       PROCESS_MEMORY_COUNTERS = struct [
         "DWORD  cb",

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

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