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

ruby-changes:45599

From: nobu <ko1@a...>
Date: Tue, 21 Feb 2017 15:07:26 +0900 (JST)
Subject: [ruby-changes:45599] nobu:r57672 (trunk): complex.c: remove deprecated functions

nobu	2017-02-21 15:07:21 +0900 (Tue, 21 Feb 2017)

  New Revision: 57672

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57672

  Log:
    complex.c: remove deprecated functions
    
    * complex.c (rb_complex_set_real, rb_complex_set_imag): remove
      functions deprecated at 2.2.

  Modified files:
    trunk/complex.c
    trunk/include/ruby/backward.h
    trunk/include/ruby/intern.h
Index: complex.c
===================================================================
--- complex.c	(revision 57671)
+++ complex.c	(revision 57672)
@@ -1447,20 +1447,6 @@ rb_Complex(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/complex.c#L1447
 }
 
 VALUE
-rb_complex_set_real(VALUE cmp, VALUE r)
-{
-    RCOMPLEX_SET_REAL(cmp, r);
-    return cmp;
-}
-
-VALUE
-rb_complex_set_imag(VALUE cmp, VALUE i)
-{
-    RCOMPLEX_SET_IMAG(cmp, i);
-    return cmp;
-}
-
-VALUE
 rb_complex_abs(VALUE cmp)
 {
     return nucomp_abs(cmp);
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 57671)
+++ include/ruby/intern.h	(revision 57672)
@@ -183,8 +183,6 @@ VALUE rb_complex_polar(VALUE, VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L183
 VALUE rb_Complex(VALUE, VALUE);
 #define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
 #define rb_Complex2(x,y) rb_Complex((x), (y))
-DEPRECATED(VALUE rb_complex_set_real(VALUE, VALUE));
-DEPRECATED(VALUE rb_complex_set_imag(VALUE, VALUE));
 /* class.c */
 VALUE rb_class_new(VALUE);
 VALUE rb_mod_init_copy(VALUE, VALUE);
Index: include/ruby/backward.h
===================================================================
--- include/ruby/backward.h	(revision 57671)
+++ include/ruby/backward.h	(revision 57672)
@@ -4,6 +4,10 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/backward.h#L4
 #define DECLARE_DEPRECATED_FEATURE(ver, func) \
     NORETURN(ERRORFUNC(("deprecated since "#ver), DEPRECATED(void func(void))))
 
+/* complex.c */
+DECLARE_DEPRECATED_FEATURE(2.2, rb_complex_set_real);
+DECLARE_DEPRECATED_FEATURE(2.2, rb_complex_set_imag);
+
 /* eval.c */
 DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super);
 DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super);

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

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