Use global defines for `Rational` and `Complex`.

parent 38486599
...@@ -2,6 +2,6 @@ MRuby::Gem::Specification.new('mruby-complex') do |spec| ...@@ -2,6 +2,6 @@ MRuby::Gem::Specification.new('mruby-complex') do |spec|
spec.license = 'MIT' spec.license = 'MIT'
spec.author = 'mruby developers' spec.author = 'mruby developers'
spec.summary = 'Complex class' spec.summary = 'Complex class'
spec.build.cc.defines << "MRB_USE_COMPLEX" spec.build.defines << "MRB_USE_COMPLEX"
spec.add_dependency 'mruby-math', core: 'mruby-math' spec.add_dependency 'mruby-math', core: 'mruby-math'
end end
...@@ -2,5 +2,5 @@ MRuby::Gem::Specification.new('mruby-rational') do |spec| ...@@ -2,5 +2,5 @@ MRuby::Gem::Specification.new('mruby-rational') do |spec|
spec.license = 'MIT' spec.license = 'MIT'
spec.author = 'mruby developers' spec.author = 'mruby developers'
spec.summary = 'Rational class' spec.summary = 'Rational class'
spec.build.cc.defines << "MRB_USE_RATIONAL" spec.build.defines << "MRB_USE_RATIONAL"
end end
...@@ -379,9 +379,10 @@ mrb_rational_eq(mrb_state *mrb, mrb_value x, mrb_value y) ...@@ -379,9 +379,10 @@ mrb_rational_eq(mrb_state *mrb, mrb_value x, mrb_value y)
} }
return a == b; return a == b;
} }
#ifdef MRB_USE_COMPLEX #ifdef MRB_USE_COMPLEX
case MRB_TT_COMPLEX: case MRB_TT_COMPLEX:
{ {
mrb_bool mrb_complex_eq(mrb_state *mrb, mrb_value, mrb_value); mrb_bool mrb_complex_eq(mrb_state *mrb, mrb_value, mrb_value);
return mrb_complex_eq(mrb, y, x); return mrb_complex_eq(mrb, y, x);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment