From 6f09379196fda978b7815f45c51a35f051daf959 Mon Sep 17 00:00:00 2001 From: ocean Date: Thu, 2 Mar 2006 09:01:51 +0000 Subject: [PATCH] * gc.c: commited magic for reducing RVALUE size on windows. (24->20byte) [ruby-core:7474] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ gc.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index dc25ee6b25..bf47584183 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 2 17:54:45 2006 Hirokazu Yamamoto + + * gc.c: commited magic for reducing RVALUE size on windows. (24->20byte) + [ruby-core:7474] + Thu Mar 2 14:12:26 2006 Tanaka Akira * gc.c: align VALUE with sizeof(RVALUE) globally. diff --git a/gc.c b/gc.c index 2e9c3b3eaa..8f4473759c 100644 --- a/gc.c +++ b/gc.c @@ -310,6 +310,10 @@ rb_global_variable(VALUE *var) rb_gc_register_address(var); } +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CYGWIN__) +#pragma pack(push, 1) /* magic for reducing sizeof(RVALUE): 24 -> 20 */ +#endif + typedef struct RVALUE { union { struct { @@ -339,6 +343,10 @@ typedef struct RVALUE { #endif } RVALUE; +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CYGWIN__) +#pragma pack(pop) +#endif + static RVALUE *freelist = 0; static RVALUE *deferred_final_list = 0;