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

ruby-changes:69001

From: Aaron <ko1@a...>
Date: Thu, 21 Oct 2021 08:19:38 +0900 (JST)
Subject: [ruby-changes:69001] ac88c61ed8 (master): cYjitCodeComment is only defined if we're not in debugging mode

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

From ac88c61ed8a4740335e856617704b3959daac33c Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Tue, 20 Apr 2021 13:47:38 -0700
Subject: cYjitCodeComment is only defined if we're not in debugging mode

This commit fixes a build error.  If we build in release mode (IOW
*without* RUBY_DEBUG), then this constant isn't defined.  Release mode
builds are required by yjit-bench
---
 yjit_iface.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/yjit_iface.c b/yjit_iface.c
index 3eb5752aa3..0471a26ada 100644
--- a/yjit_iface.c
+++ b/yjit_iface.c
@@ -1069,7 +1069,9 @@ rb_yjit_init(struct rb_yjit_options *options) https://github.com/ruby/ruby/blob/trunk/yjit_iface.c#L1069
     rb_define_alloc_func(cYjitDisasm, yjit_disasm_init);
     rb_define_method(cYjitDisasm, "disasm", yjit_disasm, 2);
     cYjitDisasmInsn = rb_struct_define_under(cYjitDisasm, "Insn", "address", "mnemonic", "op_str", NULL);
+#if RUBY_DEBUG
     cYjitCodeComment = rb_struct_define_under(cYjitDisasm, "Comment", "address", "comment");
+#endif
 #endif
 
     if (RUBY_DEBUG && rb_yjit_opts.gen_stats) {
-- 
cgit v1.2.1


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

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