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

ruby-changes:26690

From: nobu <ko1@a...>
Date: Wed, 9 Jan 2013 02:13:37 +0900 (JST)
Subject: [ruby-changes:26690] nobu:r38741 (trunk): ruby.h: align

nobu	2013-01-09 02:13:26 +0900 (Wed, 09 Jan 2013)

  New Revision: 38741

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

  Log:
    ruby.h: align
    
    * include/ruby/ruby.h (RBasic): to be aligned on a VALUE size
      boundary.  [Bug #7647]

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 38740)
+++ include/ruby/ruby.h	(revision 38741)
@@ -699,7 +699,11 @@ VALUE rb_newobj_of(VALUE, VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L699
 struct RBasic {
     VALUE flags;
     VALUE klass;
-};
+}
+#ifdef __GNUC__
+    __attribute__((aligned(sizeof(VALUE))))
+#endif
+;
 
 #define ROBJECT_EMBED_LEN_MAX 3
 struct RObject {
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38740)
+++ ChangeLog	(revision 38741)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jan  9 02:13:22 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* include/ruby/ruby.h (RBasic): to be aligned on a VALUE size
+	  boundary.  [Bug #7647]
+
 Tue Jan  8 14:41:41 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_core.h (rb_iseq_t): move flip_cnt from struct iseq_compile_data,

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

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