зеркало из https://github.com/github/ruby.git
* complex.c: avoided warnings on cpp.
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1e5fbe04f6
Коммит
32bc841571
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Dec 10 23:58:56 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
|
* complex.c: avoided warnings on cpp.
|
||||||
|
|
||||||
|
* rational.c: ditto.
|
||||||
|
|
||||||
Wed Dec 10 21:32:02 2008 Kouhei Sutou <kou@cozmixng.org>
|
Wed Dec 10 21:32:02 2008 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
* lib/rss/maker.rb (RSS::Maker.[]): add.
|
* lib/rss/maker.rb (RSS::Maker.[]): add.
|
||||||
|
|
|
@ -320,6 +320,10 @@ f_complex_new_bang2(VALUE klass, VALUE x, VALUE y)
|
||||||
return nucomp_s_new_internal(klass, x, y);
|
return nucomp_s_new_internal(klass, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef RUBY_VERSION_CODE
|
||||||
|
#include "version.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if RUBY_VERSION_CODE < 200
|
#if RUBY_VERSION_CODE < 200
|
||||||
#define CANON
|
#define CANON
|
||||||
#endif
|
#endif
|
||||||
|
@ -1427,6 +1431,10 @@ Init_Complex(void)
|
||||||
rb_undef_method(rb_cComplex, "step");
|
rb_undef_method(rb_cComplex, "step");
|
||||||
rb_undef_method(rb_cComplex, "truncate");
|
rb_undef_method(rb_cComplex, "truncate");
|
||||||
|
|
||||||
|
#ifndef NUBY
|
||||||
|
#define NUBY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if NUBY
|
#if NUBY
|
||||||
rb_undef_method(rb_cComplex, "//");
|
rb_undef_method(rb_cComplex, "//");
|
||||||
#endif
|
#endif
|
||||||
|
|
10
rational.c
10
rational.c
|
@ -377,6 +377,10 @@ f_rational_new_bang2(VALUE klass, VALUE x, VALUE y)
|
||||||
return nurat_s_new_internal(klass, x, y);
|
return nurat_s_new_internal(klass, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef RUBY_VERSION_CODE
|
||||||
|
#include "version.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if RUBY_VERSION_CODE < 200
|
#if RUBY_VERSION_CODE < 200
|
||||||
#define CANON
|
#define CANON
|
||||||
#endif
|
#endif
|
||||||
|
@ -1541,9 +1545,15 @@ Init_Rational(void)
|
||||||
rb_define_method(rb_cRational, "coerce", nurat_coerce, 1);
|
rb_define_method(rb_cRational, "coerce", nurat_coerce, 1);
|
||||||
|
|
||||||
rb_define_method(rb_cRational, "div", nurat_idiv, 1);
|
rb_define_method(rb_cRational, "div", nurat_idiv, 1);
|
||||||
|
|
||||||
|
#ifndef NUBY
|
||||||
|
#define NUBY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if NUBY
|
#if NUBY
|
||||||
rb_define_method(rb_cRational, "//", nurat_idiv, 1);
|
rb_define_method(rb_cRational, "//", nurat_idiv, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rb_define_method(rb_cRational, "modulo", nurat_mod, 1);
|
rb_define_method(rb_cRational, "modulo", nurat_mod, 1);
|
||||||
rb_define_method(rb_cRational, "%", nurat_mod, 1);
|
rb_define_method(rb_cRational, "%", nurat_mod, 1);
|
||||||
rb_define_method(rb_cRational, "divmod", nurat_divmod, 1);
|
rb_define_method(rb_cRational, "divmod", nurat_divmod, 1);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче