Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
68cf8346
Unverified
Commit
68cf8346
authored
Mar 22, 2021
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use global defines for `Rational` and `Complex`.
parent
38486599
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
mrbgems/mruby-complex/mrbgem.rake
mrbgems/mruby-complex/mrbgem.rake
+1
-1
mrbgems/mruby-rational/mrbgem.rake
mrbgems/mruby-rational/mrbgem.rake
+1
-1
mrbgems/mruby-rational/src/rational.c
mrbgems/mruby-rational/src/rational.c
+2
-1
No files found.
mrbgems/mruby-complex/mrbgem.rake
View file @
68cf8346
...
...
@@ -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
mrbgems/mruby-rational/mrbgem.rake
View file @
68cf8346
...
...
@@ -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
mrbgems/mruby-rational/src/rational.c
View file @
68cf8346
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment