From 48dce7874fcb571765635b32fa6a3e3a12e228f8 Mon Sep 17 00:00:00 2001 From: nagachika Date: Mon, 10 Nov 2025 08:37:58 +0900 Subject: simplify RSRING_GETMEM() definition. --- include/ruby/internal/core/rstring.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include/ruby/internal') diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h index 8b96532695..35175ea94a 100644 --- a/include/ruby/internal/core/rstring.h +++ b/include/ruby/internal/core/rstring.h @@ -447,17 +447,7 @@ RSTRING_LENINT(VALUE str) * @param ptrvar Variable where its contents is stored. * @param lenvar Variable where its length is stored. */ -#ifdef HAVE_STMT_AND_DECL_IN_EXPR -# define RSTRING_GETMEM(str, ptrvar, lenvar) \ - __extension__ ({ \ - (ptrvar) = RB_FL_TEST_RAW(str, RSTRING_NOEMBED) ? \ - RSTRING(str)->as.heap.ptr : \ - RSTRING(str)->as.embed.ary; \ - (lenvar) = RSTRING_LEN(str); \ - }) -#else # define RSTRING_GETMEM(str, ptrvar, lenvar) \ ((ptrvar) = RSTRING_PTR(str), \ (lenvar) = RSTRING_LEN(str)) -#endif /* HAVE_STMT_AND_DECL_IN_EXPR */ #endif /* RBIMPL_RSTRING_H */ -- cgit v1.2.3