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

ruby-changes:70961

From: Nobuyoshi <ko1@a...>
Date: Thu, 20 Jan 2022 15:28:55 +0900 (JST)
Subject: [ruby-changes:70961] 59a91f229b (master): Mark `rb_clear_constant_cache` as internal use only

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

From 59a91f229b17d9664df6ff78d7aa4e13a88cdb63 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 13 Jan 2022 11:48:12 +0900
Subject: Mark `rb_clear_constant_cache` as internal use only

In the past, many internal functions are declared in intern.h
under include/ruby directory, because there were no headers for
internal use.
---
 include/ruby/backward.h           |  3 +++
 include/ruby/internal/intern/vm.h | 11 -----------
 internal/vm.h                     |  2 ++
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/include/ruby/backward.h b/include/ruby/backward.h
index 8723d5d93de..f804c2c36e9 100644
--- a/include/ruby/backward.h
+++ b/include/ruby/backward.h
@@ -13,6 +13,9 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/backward.h#L13
 
 #define RBIMPL_ATTR_DEPRECATED_SINCE(ver) RBIMPL_ATTR_DEPRECATED(("since " #ver))
 #define RBIMPL_ATTR_DEPRECATED_INTERNAL(ver) RBIMPL_ATTR_DEPRECATED(("since "#ver", also internal"))
+#define RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() RBIMPL_ATTR_DEPRECATED(("only for internal use"))
+
+RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() void rb_clear_constant_cache(void);
 
 /* from version.c */
 #if defined(RUBY_SHOW_COPYRIGHT_TO_DIE) && !!(RUBY_SHOW_COPYRIGHT_TO_DIE+0)
diff --git a/include/ruby/internal/intern/vm.h b/include/ruby/internal/intern/vm.h
index 8215ad56515..eb53c7a356f 100644
--- a/include/ruby/internal/intern/vm.h
+++ b/include/ruby/internal/intern/vm.h
@@ -252,17 +252,6 @@ void rb_undef_alloc_func(VALUE klass); https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/intern/vm.h#L252
  */
 rb_alloc_func_t rb_get_alloc_func(VALUE klass);
 
-/**
- * Clears  the constant  cache.   Extension libraries  should  not bother  such
- * things.   Just forget  about this  API (or  even, the  presence of  constant
- * cache).
- *
- * @internal
- *
- * Completely no idea why this function is defined in vm_method.c.
- */
-void rb_clear_constant_cache(void);
-
 /**
  * Resembles `alias`.
  *
diff --git a/internal/vm.h b/internal/vm.h
index bfb593176ef..b14d5472c41 100644
--- a/internal/vm.h
+++ b/internal/vm.h
@@ -96,6 +96,8 @@ MJIT_SYMBOL_EXPORT_BEGIN https://github.com/ruby/ruby/blob/trunk/internal/vm.h#L96
 int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
 MJIT_SYMBOL_EXPORT_END
 
+void rb_clear_constant_cache(void);
+
 /* vm_dump.c */
 void rb_print_backtrace(void);
 
-- 
cgit v1.2.1


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

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