summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-23 04:41:27 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-23 04:41:27 (GMT)
commit62bfc4f24e6cddda37461347e884c094080259ea (patch)
treef270eb17e619fac0d1bce7b757df2ce07e07c824 /complex.c
parent6adcf6a898cd8d6becfebd0ee1a881e9bc77c3be (diff)
* include/ruby/ruby.h (struct RComplex): no longer. [Feature #9888]
* include/ruby/ruby.h (RCOMPLEX): ditto. * include/ruby/ruby.h (RCOMPLEX_SET_REAL): deprecated. Will be deleted later. * include/ruby/ruby.h (RCOMPLEX_SET_IMAG): ditto. * internal.h (struct RFloat): moved here. * internal.h (RCOMPLEX): ditto. * complex.c (rb_complex_set_real): do not use this. * complex.c (rb_complex_set_imag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/complex.c b/complex.c
index f9f9eed..bebce43 100644
--- a/complex.c
+++ b/complex.c
@@ -1342,6 +1342,20 @@ rb_Complex(VALUE x, VALUE y)
return nucomp_s_convert(2, a, rb_cComplex);
}
+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_REAL(cmp, i);
+ return cmp;
+}
+
/*
* call-seq:
* cmp.to_i -> integer