diff options
| author | nagachika <nagachika@ruby-lang.org> | 2025-11-10 08:37:58 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2025-11-11 18:57:30 +0900 |
| commit | 48dce7874fcb571765635b32fa6a3e3a12e228f8 (patch) | |
| tree | 5db7581a5238f5e2b749f884f834fec1f5f20a9d | |
| parent | 367ddd445cdf5ccc55a0481c944746ef595f72f7 (diff) | |
simplify RSRING_GETMEM() definition.
| -rw-r--r-- | include/ruby/internal/core/rstring.h | 10 |
1 files changed, 0 insertions, 10 deletions
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 */ |
