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
028e34d3
Commit
028e34d3
authored
May 01, 2018
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update `MRB_FLO_TO_STR_FMT` to "%.16g"; fix #4016
parent
2a38eb93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
mrbgems/mruby-compiler/core/codegen.c
mrbgems/mruby-compiler/core/codegen.c
+9
-3
src/numeric.c
src/numeric.c
+2
-2
No files found.
mrbgems/mruby-compiler/core/codegen.c
View file @
028e34d3
...
...
@@ -3049,8 +3049,8 @@ loop_pop(codegen_scope *s, int val)
if
(
val
)
push
();
}
MRB_API
struct
RProc
*
mrb_generate_code
(
mrb_state
*
mrb
,
parser_state
*
p
)
static
struct
RProc
*
generate_code
(
mrb_state
*
mrb
,
parser_state
*
p
,
int
val
)
{
codegen_scope
*
scope
=
scope_new
(
mrb
,
0
,
0
);
struct
RProc
*
proc
;
...
...
@@ -3067,7 +3067,7 @@ mrb_generate_code(mrb_state *mrb, parser_state *p)
MRB_TRY
(
&
scope
->
jmp
)
{
mrb
->
jmp
=
&
scope
->
jmp
;
/* prepare irep */
codegen
(
scope
,
p
->
tree
,
NOVAL
);
codegen
(
scope
,
p
->
tree
,
val
);
proc
=
mrb_proc_new
(
mrb
,
scope
->
irep
);
mrb_irep_decref
(
mrb
,
scope
->
irep
);
mrb_pool_close
(
scope
->
mpool
);
...
...
@@ -3086,3 +3086,9 @@ mrb_generate_code(mrb_state *mrb, parser_state *p)
}
MRB_END_EXC
(
&
scope
->
jmp
);
}
MRB_API
struct
RProc
*
mrb_generate_code
(
mrb_state
*
mrb
,
parser_state
*
p
)
{
return
generate_code
(
mrb
,
p
,
VAL
);
}
src/numeric.c
View file @
028e34d3
...
...
@@ -23,9 +23,9 @@
#define floor(f) floorf(f)
#define ceil(f) ceilf(f)
#define fmod(x,y) fmodf(x,y)
#define MRB_FLO_TO_STR_FMT "%.
7
g"
#define MRB_FLO_TO_STR_FMT "%.
8
g"
#else
#define MRB_FLO_TO_STR_FMT "%.1
4
g"
#define MRB_FLO_TO_STR_FMT "%.1
6
g"
#endif
#endif
...
...
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