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
0c91da25
Commit
0c91da25
authored
May 17, 2019
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused `mrb_num_div()` function.
parent
223defd6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
25 deletions
+11
-25
include/mruby/numeric.h
include/mruby/numeric.h
+0
-1
src/numeric.c
src/numeric.c
+11
-24
No files found.
include/mruby/numeric.h
View file @
0c91da25
...
...
@@ -39,7 +39,6 @@ MRB_API mrb_float mrb_to_flo(mrb_state *mrb, mrb_value x);
mrb_value
mrb_fixnum_plus
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
mrb_value
mrb_fixnum_minus
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
mrb_value
mrb_fixnum_mul
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
mrb_value
mrb_num_div
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
#ifndef __has_builtin
#define __has_builtin(x) 0
...
...
src/numeric.c
View file @
0c91da25
...
...
@@ -112,30 +112,6 @@ num_pow(mrb_state *mrb, mrb_value x)
#endif
}
/* 15.2.8.3.4 */
/* 15.2.9.3.4 */
/*
* call-seq:
* num / other -> num
*
* Performs division: the class of the resulting object depends on
* the class of <code>num</code> and on the magnitude of the
* result.
*/
mrb_value
mrb_num_div
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
)
{
#ifdef MRB_WITHOUT_FLOAT
if
(
!
mrb_fixnum_p
(
y
))
{
mrb_raise
(
mrb
,
E_TYPE_ERROR
,
"non fixnum value"
);
}
return
mrb_fixnum_value
(
mrb_fixnum
(
x
)
/
mrb_fixnum
(
y
));
#else
return
mrb_float_value
(
mrb
,
mrb_to_flo
(
mrb
,
x
)
/
mrb_to_flo
(
mrb
,
y
));
#endif
}
static
mrb_value
num_idiv
(
mrb_state
*
mrb
,
mrb_value
x
)
{
...
...
@@ -155,6 +131,17 @@ num_idiv(mrb_state *mrb, mrb_value x)
#endif
}
/* 15.2.8.3.4 */
/* 15.2.9.3.4 */
/*
* call-seq:
* num / other -> num
*
* Performs division: the class of the resulting object depends on
* the class of <code>num</code> and on the magnitude of the
* result.
*/
/* 15.2.9.3.19(x) */
/*
* call-seq:
...
...
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