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
db3d72a4
Commit
db3d72a4
authored
Jun 13, 2012
by
Yukihiro Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move RSHIFT from numeric.h to numeric.c
parent
6a5019d3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
include/mruby/numeric.h
include/mruby/numeric.h
+0
-1
src/numeric.c
src/numeric.c
+2
-2
No files found.
include/mruby/numeric.h
View file @
db3d72a4
...
...
@@ -13,7 +13,6 @@ extern "C" {
#include <limits.h>
#define RSHIFT(x,y) ((x)>>(int)(y))
#define POSFIXABLE(f) ((f) <= INT_MAX)
#define NEGFIXABLE(f) ((f) >= INT_MIN)
#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))
...
...
src/numeric.c
View file @
db3d72a4
...
...
@@ -28,7 +28,7 @@
#include <ieeefp.h>
#endif
#define
SIGNED_VALUE intptr_t
#define
RSHIFT(x,y) ((x)>>(int)(y))
#ifdef MRB_USE_FLOAT
#define floor(f) floorf(f)
...
...
@@ -697,7 +697,7 @@ int_succ(mrb_state *mrb, mrb_value num)
return
mrb_funcall
(
mrb
,
num
,
"+"
,
1
,
mrb_fixnum_value
(
1
));
}
#define SQRT_INT_MAX ((
SIGNED_VALUE
)1<<((sizeof(mrb_int)*CHAR_BIT-1)/2))
#define SQRT_INT_MAX ((
mrb_int
)1<<((sizeof(mrb_int)*CHAR_BIT-1)/2))
/*tests if N*N would overflow*/
#define FIT_SQRT_INT(n) (((n)<SQRT_INT_MAX)&&((n)>=-SQRT_INT_MAX))
...
...
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