mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Use global defines for Rational and Complex.
This commit is contained in:
@@ -2,6 +2,6 @@ MRuby::Gem::Specification.new('mruby-complex') do |spec|
|
||||
spec.license = 'MIT'
|
||||
spec.author = 'mruby developers'
|
||||
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'
|
||||
end
|
||||
|
||||
@@ -2,5 +2,5 @@ MRuby::Gem::Specification.new('mruby-rational') do |spec|
|
||||
spec.license = 'MIT'
|
||||
spec.author = 'mruby developers'
|
||||
spec.summary = 'Rational class'
|
||||
spec.build.cc.defines << "MRB_USE_RATIONAL"
|
||||
spec.build.defines << "MRB_USE_RATIONAL"
|
||||
end
|
||||
|
||||
@@ -379,9 +379,10 @@ mrb_rational_eq(mrb_state *mrb, mrb_value x, mrb_value y)
|
||||
}
|
||||
return a == b;
|
||||
}
|
||||
|
||||
#ifdef MRB_USE_COMPLEX
|
||||
case MRB_TT_COMPLEX:
|
||||
{
|
||||
{
|
||||
mrb_bool mrb_complex_eq(mrb_state *mrb, mrb_value, mrb_value);
|
||||
return mrb_complex_eq(mrb, y, x);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user