summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-22 03:02:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-22 03:02:40 +0000
commit062b4d675231fe9f8d266bed4406b6f591844fde (patch)
treef4c45bb968a684277224ef51ababb7f9782f61fe
parent0bd71ff35455d308c838c00a7e16fd093d36e4d7 (diff)
* include/ruby/{intern,io}.h: add missing prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--complex.c8
-rw-r--r--ext/dl/cfunc.c2
-rw-r--r--ext/zlib/zlib.c7
-rw-r--r--include/ruby/intern.h3
-rw-r--r--include/ruby/io.h1
-rw-r--r--pack.c2
-rw-r--r--rational.c8
-rw-r--r--vm_core.h3
9 files changed, 26 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index b46b8bc6095..0a2ec89dbda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jul 22 12:02:31 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/{intern,io}.h: add missing prototypes.
+
Thu Jul 22 06:38:18 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (XCFLAGS): use -fvisibility=hidden if possible.
diff --git a/complex.c b/complex.c
index 64ea3458621..51918c7f3c8 100644
--- a/complex.c
+++ b/complex.c
@@ -359,11 +359,19 @@ f_complex_new_bang2(VALUE klass, VALUE x, VALUE y)
#ifdef CANON
static int canonicalization = 0;
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
void
nucomp_canonicalization(int f)
{
canonicalization = f;
}
+
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#endif
inline static void
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index 7eb58603aaf..7378a591170 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -6,8 +6,6 @@
#include <errno.h>
#include "dl.h"
-VALUE rb_big2ulong_pack(VALUE x);
-
VALUE rb_cDLCFunc;
static ID id_last_error;
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 2523d5ff86a..20218a962ce 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -9,7 +9,7 @@
#include <ruby.h>
#include <zlib.h>
#include <time.h>
-#include <ruby/encoding.h>
+#include <ruby/io.h>
#ifdef HAVE_VALGRIND_MEMCHECK_H
# include <valgrind/memcheck.h>
@@ -209,9 +209,6 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
void Init_zlib(void);
-int rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2_p);
-VALUE rb_str_conv_enc_opts(VALUE, rb_encoding*, rb_encoding*, int, VALUE);
-
/*--------- Exceptions --------*/
static VALUE cZError, cStreamEnd, cNeedDict;
@@ -2794,7 +2791,7 @@ static void
rb_gzfile_ecopts(struct gzfile *gz, VALUE opts)
{
if (!NIL_P(opts)) {
- rb_io_extract_encoding_option(opts, &gz->enc, &gz->enc2);
+ rb_io_extract_encoding_option(opts, &gz->enc, &gz->enc2, NULL);
}
if (gz->enc2) {
gz->ecflags = rb_econv_prepare_opts(opts, &opts);
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 46b4fe77527..8c3c32e226e 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -54,6 +54,7 @@ VALUE rb_ary_aref(int, VALUE*, VALUE);
VALUE rb_ary_subseq(VALUE, long, long);
void rb_ary_store(VALUE, long, VALUE);
VALUE rb_ary_dup(VALUE);
+VALUE rb_ary_resurrect(VALUE ary);
VALUE rb_ary_to_ary(VALUE);
VALUE rb_ary_to_s(VALUE);
VALUE rb_ary_push(VALUE, VALUE);
@@ -99,6 +100,7 @@ SIGNED_VALUE rb_big2long(VALUE);
#define rb_big2int(x) rb_big2long(x)
VALUE rb_big2ulong(VALUE);
#define rb_big2uint(x) rb_big2ulong(x)
+VALUE rb_big2ulong_pack(VALUE x);
#if HAVE_LONG_LONG
VALUE rb_ll2inum(LONG_LONG);
VALUE rb_ull2inum(unsigned LONG_LONG);
@@ -635,6 +637,7 @@ VALUE rb_str_buf_cat_ascii(VALUE, const char*);
VALUE rb_obj_as_string(VALUE);
VALUE rb_check_string_type(VALUE);
VALUE rb_str_dup(VALUE);
+VALUE rb_str_resurrect(VALUE str);
VALUE rb_str_locktmp(VALUE);
VALUE rb_str_unlocktmp(VALUE);
VALUE rb_str_dup_frozen(VALUE);
diff --git a/include/ruby/io.h b/include/ruby/io.h
index ba166f8c9a3..0b1235ec6b8 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -157,6 +157,7 @@ void rb_io_check_closed(rb_io_t*);
int rb_io_wait_readable(int);
int rb_io_wait_writable(int);
void rb_io_set_nonblock(rb_io_t *fptr);
+int rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p);
/* compatibility for ruby 1.8 and older */
#define rb_io_mode_flags(modestr) rb_io_modestr_fmode(modestr)
diff --git a/pack.c b/pack.c
index be42c6293ea..0fd27c50638 100644
--- a/pack.c
+++ b/pack.c
@@ -267,8 +267,6 @@ TOKEN_PASTE(swap,x)(xtype z) \
# define VTOHD(x,y) rb_vtohd(x)
#endif
-VALUE rb_big2ulong_pack(VALUE x);
-
static unsigned long
num2i32(VALUE x)
{
diff --git a/rational.c b/rational.c
index f5a6d2655f2..1d4f1abbd59 100644
--- a/rational.c
+++ b/rational.c
@@ -403,11 +403,19 @@ f_rational_new_bang2(VALUE klass, VALUE x, VALUE y)
#ifdef CANON
static int canonicalization = 0;
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
void
nurat_canonicalization(int f)
{
canonicalization = f;
}
+
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#endif
inline static void
diff --git a/vm_core.h b/vm_core.h
index 1843567693c..a30f4c9b87f 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -645,9 +645,6 @@ NOINLINE(void rb_gc_save_machine_context(rb_thread_t *));
#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
-VALUE rb_str_resurrect(VALUE str);
-VALUE rb_ary_resurrect(VALUE ary);
-
/* for thread */
#if RUBY_VM_THREAD_MODEL == 2