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

ruby-changes:26578

From: charliesome <ko1@a...>
Date: Thu, 27 Dec 2012 21:09:44 +0900 (JST)
Subject: [ruby-changes:26578] charliesome:r38629 (trunk): * vm_core.h (VM_DEFINECLASS_TYPE): explicit cast to enum type to avoid 64->32

charliesome	2012-12-27 21:09:33 +0900 (Thu, 27 Dec 2012)

  New Revision: 38629

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

  Log:
    * vm_core.h (VM_DEFINECLASS_TYPE): explicit cast to enum type to avoid 64->32
      shorten warning

  Modified files:
    trunk/ChangeLog
    trunk/vm_core.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38628)
+++ ChangeLog	(revision 38629)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Dec 27 21:08:23 2012  Charlie Somerville  <charlie@c...>
+
+	* vm_core.h (VM_DEFINECLASS_TYPE): explicit cast to enum type to avoid 64->32
+	  shorten warning
+
 Thu Dec 27 20:11:29 2012  Masaki Matsushita  <glass.saga@g...>
 
 	* ext/stringio/stringio.c (strio_ungetc): raise IOError instead of RuntimeError
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 38628)
+++ vm_core.h	(revision 38629)
@@ -620,7 +620,7 @@ typedef enum { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L620
     VM_DEFINECLASS_TYPE_MASK            = 0x07,
 } rb_vm_defineclass_type_t;
 
-#define VM_DEFINECLASS_TYPE(x) ((x) & VM_DEFINECLASS_TYPE_MASK)
+#define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
 #define VM_DEFINECLASS_FLAG_SCOPED         0x08
 #define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
 #define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)

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

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