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

ruby-changes:70912

From: Nobuyoshi <ko1@a...>
Date: Mon, 17 Jan 2022 01:56:28 +0900 (JST)
Subject: [ruby-changes:70912] ab11cafe0b (master): Parenthesize the macro argument

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

From ab11cafe0b73a7a50f13c1d7eae1cf5e7cba1a0a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 17 Jan 2022 01:56:04 +0900
Subject: Parenthesize the macro argument

---
 internal/class.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/class.h b/internal/class.h
index 8942f80c9b8..d4c1c72414e 100644
--- a/internal/class.h
+++ b/internal/class.h
@@ -86,7 +86,7 @@ typedef struct rb_subclass_entry rb_subclass_entry_t; https://github.com/ruby/ruby/blob/trunk/internal/class.h#L86
 typedef struct rb_classext_struct rb_classext_t;
 
 #if USE_RVARGC
-#  define RCLASS_EXT(c) ((rb_classext_t *)((char *)c + sizeof(struct RClass)))
+#  define RCLASS_EXT(c) ((rb_classext_t *)((char *)(c) + sizeof(struct RClass)))
 #else
 #  define RCLASS_EXT(c) (RCLASS(c)->ptr)
 #endif
-- 
cgit v1.2.1


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

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