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

ruby-changes:46569

From: usa <ko1@a...>
Date: Fri, 12 May 2017 19:23:59 +0900 (JST)
Subject: [ruby-changes:46569] usa:r58684 (trunk): On LLP64 platform (mswin64), the return value of String#hash is fixnum.

usa	2017-05-12 19:23:53 +0900 (Fri, 12 May 2017)

  New Revision: 58684

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

  Log:
    On LLP64 platform (mswin64), the return value of String#hash is fixnum.

  Modified files:
    trunk/spec/rubyspec/optional/capi/ext/string_spec.c
Index: spec/rubyspec/optional/capi/ext/string_spec.c
===================================================================
--- spec/rubyspec/optional/capi/ext/string_spec.c	(revision 58683)
+++ spec/rubyspec/optional/capi/ext/string_spec.c	(revision 58684)
@@ -362,10 +362,8 @@ VALUE string_spec_StringValue(VALUE self https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/optional/capi/ext/string_spec.c#L362
 static VALUE string_spec_rb_str_hash(VALUE self, VALUE str) {
   st_index_t val = rb_str_hash(str);
 
-#if SIZEOF_LONG == SIZEOF_VOIDP
+#if SIZEOF_LONG == SIZEOF_VOIDP || SIZEOF_LONG_LONG == SIZEOF_VOIDP
   return LONG2FIX((long)val);
-#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
-  return LL2NUM((LONG_LONG)val);
 #else
 # error unsupported platform
 #endif

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

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