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

ruby-changes:28070

From: nobu <ko1@a...>
Date: Fri, 5 Apr 2013 19:29:52 +0900 (JST)
Subject: [ruby-changes:28070] nobu:r40122 (trunk): defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}

nobu	2013-04-05 19:29:38 +0900 (Fri, 05 Apr 2013)

  New Revision: 40122

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40122

  Log:
    defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
    
    * include/ruby/defines.h (RUBY_SYMBOL_EXPORT_{BEGIN,END}): visibility
      control macros.

  Modified files:
    trunk/configure.in
    trunk/cont.c
    trunk/dln.h
    trunk/gc.h
    trunk/include/ruby/backward/rubysig.h
    trunk/include/ruby/debug.h
    trunk/include/ruby/defines.h
    trunk/include/ruby/encoding.h
    trunk/include/ruby/intern.h
    trunk/include/ruby/io.h
    trunk/include/ruby/missing.h
    trunk/include/ruby/oniguruma.h
    trunk/include/ruby/re.h
    trunk/include/ruby/regex.h
    trunk/include/ruby/ruby.h
    trunk/include/ruby/st.h
    trunk/include/ruby/thread.h
    trunk/include/ruby/util.h
    trunk/include/ruby/version.h
    trunk/include/ruby/vm.h
    trunk/include/ruby/win32.h
    trunk/internal.h
    trunk/iseq.h
    trunk/node.h
    trunk/regenc.h
    trunk/regint.h
    trunk/regparse.h
    trunk/transcode_data.h
    trunk/vm_backtrace.c
    trunk/vm_core.h
    trunk/vm_debug.h

Index: regparse.h
===================================================================
--- regparse.h	(revision 40121)
+++ regparse.h	(revision 40122)
@@ -32,9 +32,7 @@ https://github.com/ruby/ruby/blob/trunk/regparse.h#L32
 
 #include "regint.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /* node type */
 #define NT_STR         0
@@ -360,8 +358,6 @@ extern int onig_print_names(FILE*, regex https://github.com/ruby/ruby/blob/trunk/regparse.h#L358
 #endif
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #endif /* ONIGURUMA_REGPARSE_H */
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 40121)
+++ include/ruby/intern.h	(revision 40122)
@@ -34,9 +34,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L34
 
 #include "ruby/st.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /*
  * Functions and variables that are used by more than one source file of
@@ -909,9 +907,7 @@ int rb_frame_method_id_and_class(ID *idp https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L907
 VALUE rb_make_backtrace(void);
 VALUE rb_make_exception(int, VALUE*);
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/win32.h
===================================================================
--- include/ruby/win32.h	(revision 40121)
+++ include/ruby/win32.h	(revision 40122)
@@ -8,9 +8,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/win32.h#L8
 #endif
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /*
  *  Copyright (c) 1993, Intergraph Corporation
@@ -735,9 +733,7 @@ in asynchronous_func_t. https://github.com/ruby/ruby/blob/trunk/include/ruby/win32.h#L733
 typedef uintptr_t (*asynchronous_func_t)(uintptr_t self, int argc, uintptr_t* argv);
 uintptr_t rb_w32_asynchronize(asynchronous_func_t func, uintptr_t self, int argc, uintptr_t* argv, uintptr_t intrval);
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #ifdef __MINGW_ATTRIB_PURE
 /* License: Ruby's */
Index: include/ruby/oniguruma.h
===================================================================
--- include/ruby/oniguruma.h	(revision 40121)
+++ include/ruby/oniguruma.h	(revision 40122)
@@ -98,9 +98,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/oniguruma.h#L98
 #define ONIG_EXTERN   extern
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 #include <stddef.h>		/* for size_t */
 
@@ -825,9 +823,7 @@ const char* onig_version P_((void)); https://github.com/ruby/ruby/blob/trunk/include/ruby/oniguruma.h#L823
 ONIG_EXTERN
 const char* onig_copyright P_((void));
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #ifdef __cplusplus
 #if 0
Index: include/ruby/re.h
===================================================================
--- include/ruby/re.h	(revision 40121)
+++ include/ruby/re.h	(revision 40122)
@@ -24,9 +24,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/re.h#L24
 
 #include "ruby/regex.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 typedef struct re_pattern_buffer Regexp;
 
@@ -61,9 +59,7 @@ void rb_match_busy(VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/re.h#L59
 VALUE rb_reg_quote(VALUE);
 regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/io.h
===================================================================
--- include/ruby/io.h	(revision 40121)
+++ include/ruby/io.h	(revision 40122)
@@ -49,9 +49,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L49
 #  define RB_WAITFD_OUT 0x004
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 typedef struct {
     char *ptr;                  /* off + len <= capa */
@@ -199,9 +197,7 @@ void rb_io_read_check(rb_io_t*); https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L197
 int rb_io_read_pending(rb_io_t*);
 DEPRECATED(void rb_read_check(FILE*));
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/thread.h
===================================================================
--- include/ruby/thread.h	(revision 40121)
+++ include/ruby/thread.h	(revision 40122)
@@ -21,9 +21,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/thread.h#L21
 
 #include "ruby/intern.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
 
@@ -35,9 +33,7 @@ void *rb_thread_call_without_gvl2(void * https://github.com/ruby/ruby/blob/trunk/include/ruby/thread.h#L33
 #define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_AFTER 0x01
 #define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/missing.h
===================================================================
--- include/ruby/missing.h	(revision 40121)
+++ include/ruby/missing.h	(revision 40122)
@@ -34,6 +34,11 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/missing.h#L34
 #endif
 #endif
 
+#ifndef RUBY_SYMBOL_EXPORT_BEGIN
+# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
+# define RUBY_SYMBOL_EXPORT_END   /* end */
+#endif
+
 #if !defined(HAVE_STRUCT_TIMEVAL)
 struct timeval {
     time_t tv_sec;	/* seconds */
@@ -62,9 +67,7 @@ struct timezone { https://github.com/ruby/ruby/blob/trunk/include/ruby/missing.h#L67
 #define RUBY_EXTERN extern
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 #ifndef HAVE_ACOSH
 RUBY_EXTERN double acosh(double);
@@ -229,9 +232,7 @@ RUBY_EXTERN int ruby_close(int); https://github.com/ruby/ruby/blob/trunk/include/ruby/missing.h#L232
 RUBY_EXTERN void setproctitle(const char *fmt, ...);
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/regex.h
===================================================================
--- include/ruby/regex.h	(revision 40121)
+++ include/ruby/regex.h	(revision 40122)
@@ -24,9 +24,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/regex.h#L24
 #include "oniguruma.h"
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 #ifndef ONIG_RUBY_M17N
 
@@ -36,9 +34,7 @@ ONIG_EXTERN OnigEncoding    OnigEncDefau https://github.com/ruby/ruby/blob/trunk/include/ruby/regex.h#L34
 
 #endif /* ifndef ONIG_RUBY_M17N */
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/defines.h
===================================================================
--- include/ruby/defines.h	(revision 40121)
+++ include/ruby/defines.h	(revision 40122)
@@ -88,10 +88,13 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L88
 #define ANYARGS
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
+#ifndef RUBY_SYMBOL_EXPORT_BEGIN
+# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
+# define RUBY_SYMBOL_EXPORT_END   /* end */
 #endif
 
+RUBY_SYMBOL_EXPORT_BEGIN
+
 #define xmalloc ruby_xmalloc
 #define xmalloc2 ruby_xmalloc2
 #define xcalloc ruby_xcalloc
@@ -281,9 +284,7 @@ void rb_ia64_flushrs(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L284
     RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/util.h
===================================================================
--- include/ruby/util.h	(revision 40121)
+++ include/ruby/util.h	(revision 40122)
@@ -45,9 +45,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/util.h#L45
 #endif
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 #define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e)))
 unsigned long ruby_scan_oct(const char *, size_t, size_t *);
@@ -85,9 +83,7 @@ double ruby_strtod(const char *, char ** https://github.com/ruby/ruby/blob/trunk/include/ruby/util.h#L83
 
 void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 40121)
+++ include/ruby/ruby.h	(revision 40122)
@@ -55,9 +55,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L55
 
 #include <stdarg.h>
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /* Make alloca work the best possible way.  */
 #ifdef __GNUC__
@@ -1708,9 +1706,7 @@ void ruby_sig_finalize(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1706
 
 /*! @} */
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/vm.h
===================================================================
--- include/ruby/vm.h	(revision 40121)
+++ include/ruby/vm.h	(revision 40122)
@@ -19,9 +19,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/vm.h#L19
 #endif
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /* Place holder.
  *
@@ -54,9 +52,7 @@ int ruby_vm_destruct(ruby_vm_t *vm); https://github.com/ruby/ruby/blob/trunk/include/ruby/vm.h#L52
  */
 void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/version.h
===================================================================
--- include/ruby/version.h	(revision 40121)
+++ include/ruby/version.h	(revision 40122)
@@ -43,9 +43,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/version.h#L43
 #endif
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /*
  * Interfaces from extension libraries.
@@ -63,9 +61,7 @@ RUBY_EXTERN const char ruby_description[ https://github.com/ruby/ruby/blob/trunk/include/ruby/version.h#L61
 RUBY_EXTERN const char ruby_copyright[];
 RUBY_EXTERN const char ruby_engine[];
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/encoding.h
===================================================================
--- include/ruby/encoding.h	(revision 40121)
+++ include/ruby/encoding.h	(revision 40122)
@@ -22,9 +22,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/encoding.h#L22
 #include <stdarg.h>
 #include "ruby/oniguruma.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 #define ENCODING_INLINE_MAX 1023
 #define ENCODING_SHIFT (FL_USHIFT+10)
@@ -340,9 +338,7 @@ void rb_econv_binmode(rb_econv_t *ec); https://github.com/ruby/ruby/blob/trunk/include/ruby/encoding.h#L338
 #define ECONV_AFTER_OUTPUT                      0x00020000
 /* end of flags for rb_econv_convert */
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/st.h
===================================================================
--- include/ruby/st.h	(revision 40121)
+++ include/ruby/st.h	(revision 40122)
@@ -14,9 +14,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/st.h#L14
 
 #include "ruby/defines.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 #if SIZEOF_LONG == SIZEOF_VOIDP
 typedef unsigned long st_data_t;
@@ -130,9 +128,7 @@ st_index_t st_hash_end(st_index_t h); https://github.com/ruby/ruby/blob/trunk/include/ruby/st.h#L128
 st_index_t st_hash_start(st_index_t h);
 #define st_hash_start(h) ((st_index_t)(h))
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/debug.h
===================================================================
--- include/ruby/debug.h	(revision 40121)
+++ include/ruby/debug.h	(revision 40122)
@@ -19,9 +19,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/debug.h#L19
 #endif
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /* Note: This file contains experimental APIs. */
 /* APIs can be replaced at Ruby 2.0.1 or later */
@@ -79,9 +77,7 @@ typedef enum { https://github.com/ruby/ruby/blob/trunk/include/ruby/debug.h#L77
 void rb_add_event_hook2(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
 void rb_thread_add_event_hook2(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: include/ruby/backward/rubysig.h
===================================================================
--- include/ruby/backward/rubysig.h	(revision 40121)
+++ include/ruby/backward/rubysig.h	(revision 40122)
@@ -27,9 +27,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/rubysig.h#L27
 #endif
 #endif
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 struct rb_blocking_region_buffer;
 DEPRECATED(RUBY_EXTERN struct rb_blocking_region_buffer *rb_thread_blocking_region_begin(void));
@@ -42,9 +40,7 @@ DEPRECATED(RUBY_EXTERN void rb_thread_bl https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/rubysig.h#L40
 #define ALLOW_INTS do {CHECK_INTS;} while (0)
 #define CHECK_INTS rb_thread_check_ints()
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #if defined(__cplusplus)
 #if 0
Index: configure.in
===================================================================
--- configure.in	(revision 40121)
+++ configure.in	(revision 40122)
@@ -769,6 +769,8 @@ if test "$GCC" = yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L769
     AC_SUBST(WERRORFLAG, "-Werror")
     if test "$visibility_option" = yes; then
 	RUBY_APPEND_OPTION(XCFLAGS, -fvisibility=hidden)
+	AC_DEFINE(RUBY_SYMBOL_EXPORT_BEGIN, [_Pragma("GCC visibility push(default)")])
+	AC_DEFINE(RUBY_SYMBOL_EXPORT_END,   [_Pragma("GCC visibility pop")])
     else
 	RUBY_TRY_LDFLAGS([-Wl,-unexported_symbol,_Init_*], [visibility_option=ld], [visibility_option=no])
     fi
Index: regenc.h
===================================================================
--- regenc.h	(revision 40121)
+++ regenc.h	(revision 40122)
@@ -40,9 +40,7 @@ https://github.com/ruby/ruby/blob/trunk/regenc.h#L40
 #endif
 #include "ruby/oniguruma.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 typedef struct {
   OnigCodePoint from;
@@ -220,8 +218,6 @@ extern int ONIG_ENC_REGISTER(const char https://github.com/ruby/ruby/blob/trunk/regenc.h#L218
 #define ENC_ALIAS(name, orig)
 #define ENC_DUMMY(name)
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #endif /* ONIGURUMA_REGENC_H */
Index: vm_debug.h
===================================================================
--- vm_debug.h	(revision 40121)
+++ vm_debug.h	(revision 40122)
@@ -15,9 +15,7 @@ https://github.com/ruby/ruby/blob/trunk/vm_debug.h#L15
 #include "ruby/ruby.h"
 #include "node.h"
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 #define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
 #define dp(v)    ruby_debug_print_value(-1, 0, "", (v))
@@ -34,8 +32,6 @@ void  ruby_debug_breakpoint(void); https://github.com/ruby/ruby/blob/trunk/vm_debug.h#L32
 void  ruby_debug_gc_check_func(void);
 void ruby_set_debug_option(const char *str);
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #endif /* RUBY_DEBUG_H */
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 40121)
+++ vm_core.h	(revision 40122)
@@ -633,9 +633,7 @@ typedef enum { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L633
     ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
 
 /* iseq.c */
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 /* node -> iseq */
 VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE, enum iseq_type);
@@ -658,9 +656,7 @@ RUBY_EXTERN VALUE rb_cISeq; https://github.com/ruby/ruby/blob/trunk/vm_core.h#L656
 RUBY_EXTERN VALUE rb_cRubyVM;
 RUBY_EXTERN VALUE rb_cEnv;
 RUBY_EXTERN VALUE rb_mRubyVMFrozenCore;
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #define GetProcPtr(obj, ptr) \
   GetCoreDataFromValue((obj), rb_proc_t, (ptr))
@@ -816,14 +812,10 @@ extern void rb_vmdebug_debug_print_post( https://github.com/ruby/ruby/blob/trunk/vm_core.h#L812
 void rb_vm_bugreport(void);
 
 /* functions about thread/vm execution */
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 VALUE rb_iseq_eval(VALUE iseqval);
 VALUE rb_iseq_eval_main(VALUE iseqval);
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 int rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, VALUE *klassp);
 
 VALUE rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc,
@@ -996,9 +988,7 @@ void rb_threadptr_exec_event_hooks_and_p https://github.com/ruby/ruby/blob/trunk/vm_core.h#L988
 #define EXEC_EVENT_HOOK_AND_POP_FRAME(th_, flag_, self_, id_, klass_, data_) \
   EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, klass_, data_, 1)
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
+RUBY_SYMBOL_EXPORT_BEGIN
 
 int rb_thread_check_trap_pending(void);
 
@@ -1006,8 +996,6 @@ extern VALUE rb_get_coverages(void); https://github.com/ruby/ruby/blob/trunk/vm_core.h#L996
 extern void rb_set_coverages(VALUE);
 extern void rb_reset_coverages(void);
 
-#if defined __GNUC__ && __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
+RUBY_SYMBOL_EXPORT_END
 
 #endif /* RUBY_VM_CORE_H */
Index: iseq.h
===================================================================
--- iseq.h	(revision 40121)
+++ iseq.h	(revision 40122)
@@ -12,9 +12,7 @@ https://github.com/ruby/ruby/blob/trunk/iseq.h#L12
 #ifndef RU (... truncated)

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

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