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
b1017b26
Commit
b1017b26
authored
4 years ago
by
Rory OConnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce scope of volatile keyword for MSC bug
parent
b8d896e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
mrbgems/mruby-random/src/random.c
mrbgems/mruby-random/src/random.c
+7
-4
No files found.
mrbgems/mruby-random/src/random.c
View file @
b1017b26
...
@@ -215,15 +215,18 @@ mrb_ary_shuffle_bang(mrb_state *mrb, mrb_value ary)
...
@@ -215,15 +215,18 @@ mrb_ary_shuffle_bang(mrb_state *mrb, mrb_value ary)
{
{
mrb_int
i
;
mrb_int
i
;
mrb_value
max
;
mrb_value
max
;
mrb_value
r
=
mrb_nil_value
();
rand_state
*
random
;
/*
/*
* MSC compiler generating invalid instructions with optimization
* MSC compiler
bug
generating invalid instructions with optimization
* enabled
* enabled
*/
*/
#if defined _MSC_VER && _MSC_VER >= 1923
#if defined _MSC_VER && _MSC_VER >= 1923
volatile
volatile
mrb_value
rr
;
rr
=
r
;
r
=
rr
;
#endif
#endif
mrb_value
r
=
mrb_nil_value
();
rand_state
*
random
;
if
(
RARRAY_LEN
(
ary
)
>
1
)
{
if
(
RARRAY_LEN
(
ary
)
>
1
)
{
mrb_get_args
(
mrb
,
"|o"
,
&
r
);
mrb_get_args
(
mrb
,
"|o"
,
&
r
);
...
...
This diff is collapsed.
Click to expand it.
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