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
a127ded4
Unverified
Commit
a127ded4
authored
Sep 04, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warning from VC regarding implicit int conversion.
parent
fe3c3bb6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
mrbgems/mruby-eval/src/eval.c
mrbgems/mruby-eval/src/eval.c
+1
-1
mrbgems/mruby-print/src/print.c
mrbgems/mruby-print/src/print.c
+4
-4
mrbgems/mruby-rational/src/rational.c
mrbgems/mruby-rational/src/rational.c
+1
-1
src/vm.c
src/vm.c
+1
-1
No files found.
mrbgems/mruby-eval/src/eval.c
View file @
a127ded4
...
@@ -20,7 +20,7 @@ create_proc_from_string(mrb_state *mrb, const char *s, mrb_int len, mrb_value bi
...
@@ -20,7 +20,7 @@ create_proc_from_string(mrb_state *mrb, const char *s, mrb_int len, mrb_value bi
struct
REnv
*
e
;
struct
REnv
*
e
;
mrb_callinfo
*
ci
;
/* callinfo of eval caller */
mrb_callinfo
*
ci
;
/* callinfo of eval caller */
struct
RClass
*
target_class
=
NULL
;
struct
RClass
*
target_class
=
NULL
;
int
bidx
;
mrb_
int
bidx
;
if
(
!
mrb_nil_p
(
binding
))
{
if
(
!
mrb_nil_p
(
binding
))
{
mrb_raise
(
mrb
,
E_ARGUMENT_ERROR
,
"Binding of eval must be nil."
);
mrb_raise
(
mrb
,
E_ARGUMENT_ERROR
,
"Binding of eval must be nil."
);
...
...
mrbgems/mruby-print/src/print.c
View file @
a127ded4
...
@@ -17,22 +17,22 @@
...
@@ -17,22 +17,22 @@
#endif
#endif
static
void
static
void
printstr
(
mrb_state
*
mrb
,
const
char
*
p
,
size_
t
len
)
printstr
(
mrb_state
*
mrb
,
const
char
*
p
,
mrb_in
t
len
)
{
{
#if defined(_WIN32)
#if defined(_WIN32)
if
(
isatty
(
fileno
(
stdout
)))
{
if
(
isatty
(
fileno
(
stdout
)))
{
DWORD
written
;
DWORD
written
;
size_t
wlen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
p
,
len
,
NULL
,
0
);
int
wlen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
p
,
(
int
)
len
,
NULL
,
0
);
wchar_t
*
utf16
=
(
wchar_t
*
)
mrb_malloc
(
mrb
,
(
wlen
+
1
)
*
sizeof
(
wchar_t
));
wchar_t
*
utf16
=
(
wchar_t
*
)
mrb_malloc
(
mrb
,
(
wlen
+
1
)
*
sizeof
(
wchar_t
));
if
(
MultiByteToWideChar
(
CP_UTF8
,
0
,
p
,
len
,
utf16
,
wlen
)
>
0
)
{
if
(
MultiByteToWideChar
(
CP_UTF8
,
0
,
p
,
len
,
utf16
,
wlen
)
>
0
)
{
utf16
[
wlen
]
=
0
;
utf16
[
wlen
]
=
0
;
WriteConsoleW
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
WriteConsoleW
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
utf16
,
wlen
,
&
written
,
NULL
);
utf16
,
(
DWORD
)
wlen
,
&
written
,
NULL
);
}
}
mrb_free
(
mrb
,
utf16
);
mrb_free
(
mrb
,
utf16
);
}
else
}
else
#endif
#endif
fwrite
(
p
,
len
,
1
,
stdout
);
fwrite
(
p
,
(
size_t
)
len
,
1
,
stdout
);
fflush
(
stdout
);
fflush
(
stdout
);
}
}
...
...
mrbgems/mruby-rational/src/rational.c
View file @
a127ded4
...
@@ -115,7 +115,7 @@ rational_new_f(mrb_state *mrb, mrb_float f0)
...
@@ -115,7 +115,7 @@ rational_new_f(mrb_state *mrb, mrb_float f0)
if
(
f
<
0
)
{
neg
=
1
;
f
=
-
f
;
}
if
(
f
<
0
)
{
neg
=
1
;
f
=
-
f
;
}
while
(
f
!=
floor
(
f
))
{
n
<<=
1
;
f
*=
2
;
}
while
(
f
!=
floor
(
f
))
{
n
<<=
1
;
f
*=
2
;
}
d
=
f
;
d
=
(
mrb_int
)
f
;
/* continued fraction and check denominator each step */
/* continued fraction and check denominator each step */
for
(
i
=
0
;
i
<
64
;
i
++
)
{
for
(
i
=
0
;
i
<
64
;
i
++
)
{
...
...
src/vm.c
View file @
a127ded4
...
@@ -223,7 +223,7 @@ mrb_stack_extend(mrb_state *mrb, mrb_int room)
...
@@ -223,7 +223,7 @@ mrb_stack_extend(mrb_state *mrb, mrb_int room)
}
}
static
inline
struct
REnv
*
static
inline
struct
REnv
*
uvenv
(
mrb_state
*
mrb
,
int
up
)
uvenv
(
mrb_state
*
mrb
,
mrb_
int
up
)
{
{
const
struct
RProc
*
proc
=
mrb
->
c
->
ci
->
proc
;
const
struct
RProc
*
proc
=
mrb
->
c
->
ci
->
proc
;
struct
REnv
*
e
;
struct
REnv
*
e
;
...
...
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