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

ruby-changes:31715

From: nari <ko1@a...>
Date: Fri, 22 Nov 2013 16:27:08 +0900 (JST)
Subject: [ruby-changes:31715] nari:r43794 (trunk): * include/ruby/intern.h (rb_gc_set_params): Deprecate

nari	2013-11-22 16:26:55 +0900 (Fri, 22 Nov 2013)

  New Revision: 43794

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

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/include/ruby/intern.h
    trunk/internal.h
    trunk/ruby.c
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 43793)
+++ include/ruby/intern.h	(revision 43794)
@@ -482,7 +482,7 @@ void rb_gc_call_finalizer_at_exit(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L482
 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 */
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43793)
+++ ChangeLog	(revision 43794)
@@ -1,3 +1,15 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov 22 16:19:52 2013  Narihiro Nakamura  <authornari@g...>
+
+	* 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@m...>
 
 	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Insert rb_thread_check_ints.
Index: gc.c
===================================================================
--- gc.c	(revision 43793)
+++ gc.c	(revision 43794)
@@ -5260,7 +5260,7 @@ get_envparam_double(const char *name, do https://github.com/ruby/ruby/blob/trunk/gc.c#L5260
 }
 
 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) https://github.com/ruby/ruby/blob/trunk/gc.c#L5287
     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)
 {
Index: internal.h
===================================================================
--- internal.h	(revision 43793)
+++ internal.h	(revision 43794)
@@ -431,6 +431,7 @@ void *ruby_mimmalloc(size_t size); https://github.com/ruby/ruby/blob/trunk/internal.h#L431
 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);
Index: ruby.c
===================================================================
--- ruby.c	(revision 43793)
+++ ruby.c	(revision 43794)
@@ -1568,7 +1568,7 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1568
     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;
 }

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

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