summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-02-28 12:55:46 +0900
committerNobuyoshi Nakada <[email protected]>2025-02-28 12:55:46 +0900
commit42c0722f83d7ed60360bbaf17f2d45e7cfe7d121 ()
treef6778625fb763b227017977dcdc3c85ae0880440 /include/ruby
parent3294d3d4571bd50a86e701a46ffd70505afdad87 (diff)
[DOC] Fix the comment for RUBY_CONST_ID and rb_intern
RUBY_CONST_ID has never been deprecated; `rb_intern` is handy but it is using non-standard GCC extensions and does not cache the ID with other compilers.
-rw-r--r--include/ruby/internal/symbol.h8
1 files changed, 5 insertions, 3 deletions
@@ -316,8 +316,9 @@ rbimpl_intern_const(ID *ptr, const char *str)
}
/**
- * Old implementation detail of rb_intern().
- * @deprecated Does anyone use it? Preserved for backward compat.
*/
#define RUBY_CONST_ID(var, str) \
do { \
@@ -326,7 +327,8 @@ rbimpl_intern_const(ID *ptr, const char *str)
} while (0)
#if defined(HAVE_STMT_AND_DECL_IN_EXPR)
-/* __builtin_constant_p and statement expression is available
* since gcc-2.7.2.3 at least. */
#define rb_intern(str) \
(RBIMPL_CONSTANT_P(str) ? \