summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--gc.c4
-rw-r--r--include/ruby/intern.h2
-rw-r--r--internal.h1
-rw-r--r--ruby.c2
5 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 93829ca..729d6ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Fri Nov 22 16:19:52 2013 Narihiro Nakamura <authornari@gmail.com>
+
+ * include/ruby/intern.h (rb_gc_set_params): Deprecate
+ rb_gc_set_params because it's only used in ruby internal.
+
+ * internal.h (ruby_gc_set_params): Declare rb_gc_set_params's
+ alias function.
+
+ * gc.c: ditto.
+
+ * ruby.c: use ruby_gc_set_params.
+
Fri Nov 22 14:55:00 2013 Kenta Murata <mrkn@mrkn.jp>
* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Insert rb_thread_check_ints.
diff --git a/gc.c b/gc.c
index f753241..1cc08e2 100644
--- a/gc.c
+++ b/gc.c
@@ -5260,7 +5260,7 @@ get_envparam_double(const char *name, double *default_value, double lower_bound)
}
void
-rb_gc_set_params(void)
+ruby_gc_set_params(void)
{
if (rb_safe_level() > 0) return;
@@ -5287,6 +5287,8 @@ rb_gc_set_params(void)
get_envparam_double("RUBY_GC_HEAP_OLDSPACE_GROWTH_FACTOR", &gc_params.oldspace_limit_growth_factor, 1.0);
}
+RUBY_ALIAS_FUNCTION_VOID(rb_gc_set_params(void), ruby_gc_set_params, (void))
+
void
rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data)
{
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 7011972..4430714 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -482,7 +482,7 @@ void rb_gc_call_finalizer_at_exit(void);
VALUE rb_gc_enable(void);
VALUE rb_gc_disable(void);
VALUE rb_gc_start(void);
-void rb_gc_set_params(void);
+DEPRECATED(void rb_gc_set_params(void));
VALUE rb_define_finalizer(VALUE, VALUE);
VALUE rb_undefine_finalizer(VALUE);
/* hash.c */
diff --git a/internal.h b/internal.h
index 10819a2..e3eb2fe 100644
--- a/internal.h
+++ b/internal.h
@@ -431,6 +431,7 @@ void *ruby_mimmalloc(size_t size);
void ruby_mimfree(void *ptr);
void rb_objspace_set_event_hook(const rb_event_flag_t event);
void rb_gc_writebarrier_remember_promoted(VALUE obj);
+void ruby_gc_set_params(void);
void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2));
void ruby_sized_xfree(void *x, size_t size);
diff --git a/ruby.c b/ruby.c
index 0532c1a..034425e 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1568,7 +1568,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
rb_define_readonly_boolean("$-a", opt->do_split);
rb_set_safe_level(opt->safe_level);
- rb_gc_set_params();
+ ruby_gc_set_params();
return iseq;
}