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

ruby-changes:35513

From: nagachika <ko1@a...>
Date: Mon, 15 Sep 2014 22:33:31 +0900 (JST)
Subject: [ruby-changes:35513] nagachika:r47595 (ruby_2_1): merge revision(s) r47590: [Backport #10241]

nagachika	2014-09-15 22:33:17 +0900 (Mon, 15 Sep 2014)

  New Revision: 47595

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

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

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/ext/fiddle/lib/fiddle/import.rb
    branches/ruby_2_1/test/fiddle/test_import.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 47594)
+++ ruby_2_1/ChangeLog	(revision 47595)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Mon Sep 15 22:31:33 2014  Sho Hashimoto  <sho.hsmt@g...>
+
+	* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof): fix typo,
+	  SIZEOF_LONG_LON.  [Fix GH-714]
+
 Mon Sep 15 11:08:23 2014  Shota Fukumori  <her@s...>
 
 	* lib/mkmf.rb (configuration): Make CXXFLAGS customizable.
Index: ruby_2_1/ext/fiddle/lib/fiddle/import.rb
===================================================================
--- ruby_2_1/ext/fiddle/lib/fiddle/import.rb	(revision 47594)
+++ ruby_2_1/ext/fiddle/lib/fiddle/import.rb	(revision 47595)
@@ -112,7 +112,7 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ruby_2_1/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_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 47594)
+++ ruby_2_1/version.h	(revision 47595)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.2"
 #define RUBY_RELEASE_DATE "2014-09-15"
-#define RUBY_PATCHLEVEL 238
+#define RUBY_PATCHLEVEL 239
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 9
Index: ruby_2_1/test/fiddle/test_import.rb
===================================================================
--- ruby_2_1/test/fiddle/test_import.rb	(revision 47594)
+++ ruby_2_1/test/fiddle/test_import.rb	(revision 47595)
@@ -65,6 +65,15 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ruby_2_1/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_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r47590


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

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