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

ruby-changes:35528

From: usa <ko1@a...>
Date: Wed, 17 Sep 2014 15:08:29 +0900 (JST)
Subject: [ruby-changes:35528] usa:r47610 (ruby_2_0_0): merge revision(s) 47590: [Backport #10241]

usa	2014-09-17 15:08:22 +0900 (Wed, 17 Sep 2014)

  New Revision: 47610

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

  Log:
    merge revision(s) 47590: [Backport #10241]
    
    * ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof): fix typo,
      SIZEOF_LONG_LON.  [Fix GH-714]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/ext/fiddle/lib/fiddle/import.rb
    branches/ruby_2_0_0/test/fiddle/test_import.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 47609)
+++ ruby_2_0_0/ChangeLog	(revision 47610)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Wed Sep 17 15:07:35 2014  Sho Hashimoto  <sho.hsmt@g...>
+
+	* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof): fix typo,
+	  SIZEOF_LONG_LON.  [Fix GH-714]
+
 Wed Sep 17 14:58:50 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/mkmf.rb (MakeMakefile#pkg_config): append --cflags to also
Index: ruby_2_0_0/ext/fiddle/lib/fiddle/import.rb
===================================================================
--- ruby_2_0_0/ext/fiddle/lib/fiddle/import.rb	(revision 47609)
+++ ruby_2_0_0/ext/fiddle/lib/fiddle/import.rb	(revision 47610)
@@ -112,7 +112,7 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/fiddle/lib/fiddle/import.rb#L112
         when TYPE_LONG
           return SIZEOF_LONG
         when TYPE_LONG_LONG
-          return SIZEOF_LONG_LON
+          return SIZEOF_LONG_LONG
         when TYPE_FLOAT
           return SIZEOF_FLOAT
         when TYPE_DOUBLE
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 47609)
+++ ruby_2_0_0/version.h	(revision 47610)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-09-17"
-#define RUBY_PATCHLEVEL 572
+#define RUBY_PATCHLEVEL 573
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 9
Index: ruby_2_0_0/test/fiddle/test_import.rb
===================================================================
--- ruby_2_0_0/test/fiddle/test_import.rb	(revision 47609)
+++ ruby_2_0_0/test/fiddle/test_import.rb	(revision 47610)
@@ -65,6 +65,15 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/fiddle/test_import.rb#L65
       assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct.malloc()))
     end
 
+    Fiddle.constants.grep(/\ATYPE_(?!VOID\z)(.*)/) do
+      type = $&
+      size = Fiddle.const_get("SIZEOF_#{$1}")
+      name = $1.sub(/P\z/,"*").gsub(/_(?!T\z)/, " ").downcase
+      define_method("test_sizeof_#{name}") do
+        assert_equal(size, Fiddle::Importer.sizeof(name), type)
+      end
+    end
+
     def test_unsigned_result()
       d = (2 ** 31) + 1
 

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r47590


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

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