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

ruby-changes:67227

From: Nobuyoshi <ko1@a...>
Date: Tue, 24 Aug 2021 10:38:00 +0900 (JST)
Subject: [ruby-changes:67227] c38c2d8ee2 (master): Moved exported symbols in internal/util.h to ruby/util.h

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

From c38c2d8ee26c70300e2e0a4eec867273a8520579 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 28 Jul 2021 16:40:02 +0900
Subject: Moved exported symbols in internal/util.h to ruby/util.h

[Feature #18051]
---
 bignum.c            |  1 -
 common.mk           | 11 ++++-------
 debug.c             |  1 -
 include/ruby/util.h |  4 ++++
 internal/util.h     |  3 ---
 memory_view.c       |  2 +-
 pack.c              |  2 +-
 parse.y             |  1 -
 sprintf.c           |  2 +-
 strftime.c          |  2 +-
 10 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/bignum.c b/bignum.c
index da5df41..c954fe6 100644
--- a/bignum.c
+++ b/bignum.c
@@ -36,7 +36,6 @@ https://github.com/ruby/ruby/blob/trunk/bignum.c#L36
 #include "internal/numeric.h"
 #include "internal/object.h"
 #include "internal/sanitizers.h"
-#include "internal/util.h"
 #include "internal/variable.h"
 #include "internal/warnings.h"
 #include "ruby/thread.h"
diff --git a/common.mk b/common.mk
index 164d927..f42d1b6 100644
--- a/common.mk
+++ b/common.mk
@@ -2111,7 +2111,6 @@ bignum.$(OBJEXT): $(top_srcdir)/internal/object.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2111
 bignum.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
 bignum.$(OBJEXT): $(top_srcdir)/internal/serial.h
 bignum.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-bignum.$(OBJEXT): $(top_srcdir)/internal/util.h
 bignum.$(OBJEXT): $(top_srcdir)/internal/variable.h
 bignum.$(OBJEXT): $(top_srcdir)/internal/vm.h
 bignum.$(OBJEXT): $(top_srcdir)/internal/warnings.h
@@ -3436,7 +3435,6 @@ debug.$(OBJEXT): $(top_srcdir)/internal/imemo.h https://github.com/ruby/ruby/blob/trunk/common.mk#L3435
 debug.$(OBJEXT): $(top_srcdir)/internal/serial.h
 debug.$(OBJEXT): $(top_srcdir)/internal/signal.h
 debug.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-debug.$(OBJEXT): $(top_srcdir)/internal/util.h
 debug.$(OBJEXT): $(top_srcdir)/internal/vm.h
 debug.$(OBJEXT): $(top_srcdir)/internal/warnings.h
 debug.$(OBJEXT): {$(VPATH)}assert.h
@@ -7881,7 +7879,6 @@ math.$(OBJEXT): {$(VPATH)}st.h https://github.com/ruby/ruby/blob/trunk/common.mk#L7879
 math.$(OBJEXT): {$(VPATH)}subst.h
 memory_view.$(OBJEXT): $(hdrdir)/ruby/ruby.h
 memory_view.$(OBJEXT): $(top_srcdir)/internal/hash.h
-memory_view.$(OBJEXT): $(top_srcdir)/internal/util.h
 memory_view.$(OBJEXT): $(top_srcdir)/internal/variable.h
 memory_view.$(OBJEXT): {$(VPATH)}assert.h
 memory_view.$(OBJEXT): {$(VPATH)}backward/2/assume.h
@@ -8045,6 +8042,7 @@ memory_view.$(OBJEXT): {$(VPATH)}missing.h https://github.com/ruby/ruby/blob/trunk/common.mk#L8042
 memory_view.$(OBJEXT): {$(VPATH)}node.h
 memory_view.$(OBJEXT): {$(VPATH)}st.h
 memory_view.$(OBJEXT): {$(VPATH)}subst.h
+memory_view.$(OBJEXT): {$(VPATH)}util.h
 memory_view.$(OBJEXT): {$(VPATH)}vm_debug.h
 memory_view.$(OBJEXT): {$(VPATH)}vm_sync.h
 miniinit.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
@@ -9277,7 +9275,6 @@ pack.$(OBJEXT): $(top_srcdir)/internal/compilers.h https://github.com/ruby/ruby/blob/trunk/common.mk#L9275
 pack.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
 pack.$(OBJEXT): $(top_srcdir)/internal/string.h
 pack.$(OBJEXT): $(top_srcdir)/internal/symbol.h
-pack.$(OBJEXT): $(top_srcdir)/internal/util.h
 pack.$(OBJEXT): $(top_srcdir)/internal/variable.h
 pack.$(OBJEXT): $(top_srcdir)/internal/warnings.h
 pack.$(OBJEXT): {$(VPATH)}assert.h
@@ -9444,6 +9441,7 @@ pack.$(OBJEXT): {$(VPATH)}pack.c https://github.com/ruby/ruby/blob/trunk/common.mk#L9441
 pack.$(OBJEXT): {$(VPATH)}pack.rbinc
 pack.$(OBJEXT): {$(VPATH)}st.h
 pack.$(OBJEXT): {$(VPATH)}subst.h
+pack.$(OBJEXT): {$(VPATH)}util.h
 parse.$(OBJEXT): $(hdrdir)/ruby.h
 parse.$(OBJEXT): $(hdrdir)/ruby/ruby.h
 parse.$(OBJEXT): $(top_srcdir)/internal/array.h
@@ -9467,7 +9465,6 @@ parse.$(OBJEXT): $(top_srcdir)/internal/static_assert.h https://github.com/ruby/ruby/blob/trunk/common.mk#L9465
 parse.$(OBJEXT): $(top_srcdir)/internal/string.h
 parse.$(OBJEXT): $(top_srcdir)/internal/symbol.h
 parse.$(OBJEXT): $(top_srcdir)/internal/thread.h
-parse.$(OBJEXT): $(top_srcdir)/internal/util.h
 parse.$(OBJEXT): $(top_srcdir)/internal/variable.h
 parse.$(OBJEXT): $(top_srcdir)/internal/vm.h
 parse.$(OBJEXT): $(top_srcdir)/internal/warnings.h
@@ -12757,7 +12754,6 @@ sprintf.$(OBJEXT): $(top_srcdir)/internal/serial.h https://github.com/ruby/ruby/blob/trunk/common.mk#L12754
 sprintf.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
 sprintf.$(OBJEXT): $(top_srcdir)/internal/string.h
 sprintf.$(OBJEXT): $(top_srcdir)/internal/symbol.h
-sprintf.$(OBJEXT): $(top_srcdir)/internal/util.h
 sprintf.$(OBJEXT): $(top_srcdir)/internal/vm.h
 sprintf.$(OBJEXT): $(top_srcdir)/internal/warnings.h
 sprintf.$(OBJEXT): {$(VPATH)}assert.h
@@ -12925,6 +12921,7 @@ sprintf.$(OBJEXT): {$(VPATH)}regex.h https://github.com/ruby/ruby/blob/trunk/common.mk#L12921
 sprintf.$(OBJEXT): {$(VPATH)}sprintf.c
 sprintf.$(OBJEXT): {$(VPATH)}st.h
 sprintf.$(OBJEXT): {$(VPATH)}subst.h
+sprintf.$(OBJEXT): {$(VPATH)}util.h
 sprintf.$(OBJEXT): {$(VPATH)}vsnprintf.c
 st.$(OBJEXT): $(hdrdir)/ruby.h
 st.$(OBJEXT): $(hdrdir)/ruby/ruby.h
@@ -13097,7 +13094,6 @@ strftime.$(OBJEXT): $(top_srcdir)/internal/compilers.h https://github.com/ruby/ruby/blob/trunk/common.mk#L13094
 strftime.$(OBJEXT): $(top_srcdir)/internal/serial.h
 strftime.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
 strftime.$(OBJEXT): $(top_srcdir)/internal/string.h
-strftime.$(OBJEXT): $(top_srcdir)/internal/util.h
 strftime.$(OBJEXT): $(top_srcdir)/internal/vm.h
 strftime.$(OBJEXT): {$(VPATH)}assert.h
 strftime.$(OBJEXT): {$(VPATH)}backward/2/assume.h
@@ -13260,6 +13256,7 @@ strftime.$(OBJEXT): {$(VPATH)}st.h https://github.com/ruby/ruby/blob/trunk/common.mk#L13256
 strftime.$(OBJEXT): {$(VPATH)}strftime.c
 strftime.$(OBJEXT): {$(VPATH)}subst.h
 strftime.$(OBJEXT): {$(VPATH)}timev.h
+strftime.$(OBJEXT): {$(VPATH)}util.h
 string.$(OBJEXT): $(hdrdir)/ruby.h
 string.$(OBJEXT): $(hdrdir)/ruby/ruby.h
 string.$(OBJEXT): $(top_srcdir)/internal/array.h
diff --git a/debug.c b/debug.c
index 75d4cc6..3b4f1cb 100644
--- a/debug.c
+++ b/debug.c
@@ -16,7 +16,6 @@ https://github.com/ruby/ruby/blob/trunk/debug.c#L16
 #include "eval_intern.h"
 #include "id.h"
 #include "internal/signal.h"
-#include "internal/util.h"
 #include "ruby/encoding.h"
 #include "ruby/io.h"
 #include "ruby/ruby.h"
diff --git a/include/ruby/util.h b/include/ruby/util.h
index af022da..660f91d 100644
--- a/include/ruby/util.h
+++ b/include/ruby/util.h
@@ -19,6 +19,10 @@ RBIMPL_SYMBOL_EXPORT_BEGIN() https://github.com/ruby/ruby/blob/trunk/include/ruby/util.h#L19
 #define DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999)
 /* an approximation of ceil(n * log10(2)), up to 65536 at least */
 
+RUBY_EXTERN const signed char ruby_digit36_to_number_table[];
+RUBY_EXTERN const char ruby_hexdigits[];
+
+unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
 #define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e)))
 unsigned long ruby_scan_oct(const char *, size_t, size_t *);
 #define scan_hex(s,l,e) ((int)ruby_scan_hex((s),(l),(e)))
diff --git a/internal/util.h b/internal/util.h
index c28b884..605720d 100644
--- a/internal/util.h
+++ b/internal/util.h
@@ -23,9 +23,6 @@ char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign https://github.com/ruby/ruby/blob/trunk/internal/util.h#L23
 
 RUBY_SYMBOL_EXPORT_BEGIN
 /* util.c (export) */
-extern const signed char ruby_digit36_to_number_table[];
-extern const char ruby_hexdigits[];
-extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
 RUBY_SYMBOL_EXPORT_END
 
 #endif /* INTERNAL_UTIL_H */
diff --git a/memory_view.c b/memory_view.c
index 6e422c1..4c6c122 100644
--- a/memory_view.c
+++ b/memory_view.c
@@ -9,8 +9,8 @@ https://github.com/ruby/ruby/blob/trunk/memory_view.c#L9
 #include "internal.h"
 #include "internal/hash.h"
 #include "internal/variable.h"
-#include "internal/util.h"
 #include "ruby/memory_view.h"
+#include "ruby/util.h"
 #include "vm_sync.h"
 
 #if SIZEOF_INTPTR_T == SIZEOF_LONG_LONG
diff --git a/pack.c b/pack.c
index 4403465..280d452 100644
--- a/pack.c
+++ b/pack.c
@@ -21,8 +21,8 @@ https://github.com/ruby/ruby/blob/trunk/pack.c#L21
 #include "internal/bits.h"
 #include "internal/string.h"
 #include "internal/symbol.h"
-#include "internal/util.h"
 #include "internal/variable.h"
+#include "ruby/util.h"
 
 #include "builtin.h"
 
diff --git a/parse.y b/parse.y
index 65c90a7..2873d2f 100644
--- a/parse.y
+++ b/parse.y
@@ -42,7 +42,6 @@ struct lex_context; https://github.com/ruby/ruby/blob/trunk/parse.y#L42
 #include "internal/re.h"
 #include "internal/symbol.h"
 #include "internal/thread.h"
-#include "internal/util.h"
 #include "internal/variable.h"
 #include "node.h"
 #include "probes.h"
diff --git a/sprintf.c b/sprintf.c
index 693b30b..5237b8d 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -28,9 +28,9 @@ https://github.com/ruby/ruby/blob/trunk/sprintf.c#L28
 #include "internal/object.h"
 #include "internal/sanitizers.h"
 #include "internal/symbol.h"
-#include "internal/util.h"
 #include "ruby/encoding.h"
 #include "ruby/re.h"
+#include "ruby/util.h"
 
 #define BIT_DIGITS(N)   (((N)*146)/485 + 1)  /* log2(10) =~ 146/485 */
 
diff --git a/strftime.c b/strftime.c
index 17cfed1..4451fe3 100644
--- a/strftime.c
+++ b/strftime.c
@@ -67,10 +67,10 @@ https://github.com/ruby/ruby/blob/trunk/strftime.c#L67
 
 #include "internal.h"
 #include "internal/string.h"
-#include "internal/util.h"
 #include "internal/vm.h"
 #include "ruby/encoding.h"
 #include "ruby/ruby.h"
+#include "ruby/util.h"
 #include "timev.h"
 
 /* defaults: season to taste */
-- 
cgit v1.1


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

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