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

ruby-changes:68768

From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:13:29 +0900 (JST)
Subject: [ruby-changes:68768] d3c9e31104 (master): Fix empty struct

https://git.ruby-lang.org/ruby.git/commit/?id=d3c9e31104

From d3c9e31104ab60177c9b4f97e8a0a393f41ad70c Mon Sep 17 00:00:00 2001
From: Alan Wu <XrXr@u...>
Date: Tue, 16 Feb 2021 16:50:09 -0500
Subject: Fix empty struct

---
 ujit_iface.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ujit_iface.c b/ujit_iface.c
index 2a6f4fea90..675cadd798 100644
--- a/ujit_iface.c
+++ b/ujit_iface.c
@@ -127,7 +127,9 @@ cfunc_needs_frame(const rb_method_cfunc_t *cfunc) https://github.com/ruby/ruby/blob/trunk/ujit_iface.c#L127
 }
 
 // GC root for interacting with the GC
-struct ujit_root_struct {};
+struct ujit_root_struct {
+    int unused; // empty structs are not legal in C99
+};
 
 // Map cme_or_cc => [[iseq, offset]]. An entry in the map means compiled code at iseq[offset]
 // is only valid when cme_or_cc is valid
-- 
cgit v1.2.1


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

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