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
dd1ce5d5
Unverified
Commit
dd1ce5d5
authored
Aug 29, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence warnings from implicit integer conversions.
Caused from combination of `mrb_int`, `int` and `size_t`..
parent
7eaaee54
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
include/mruby.h
include/mruby.h
+4
-4
mrbgems/mruby-complex/src/complex.c
mrbgems/mruby-complex/src/complex.c
+1
-1
mrbgems/mruby-print/src/print.c
mrbgems/mruby-print/src/print.c
+1
-1
src/class.c
src/class.c
+2
-2
src/vm.c
src/vm.c
+6
-6
No files found.
include/mruby.h
View file @
dd1ce5d5
...
...
@@ -1040,8 +1040,8 @@ MRB_API mrb_value mrb_get_arg1(mrb_state *mrb);
* @param ... Variadic values(not type safe!).
* @return [mrb_value] mruby function value.
*/
MRB_API
mrb_value
mrb_funcall
(
mrb_state
*
mrb
,
mrb_value
val
,
const
char
*
name
,
mrb_
int
argc
,
...);
MRB_API
mrb_value
mrb_funcall_id
(
mrb_state
*
mrb
,
mrb_value
val
,
mrb_sym
mid
,
mrb_
int
argc
,
...);
MRB_API
mrb_value
mrb_funcall
(
mrb_state
*
mrb
,
mrb_value
val
,
const
char
*
name
,
int
argc
,
...);
MRB_API
mrb_value
mrb_funcall_id
(
mrb_state
*
mrb
,
mrb_value
val
,
mrb_sym
mid
,
int
argc
,
...);
/**
* Call existing ruby functions. This is basically the type safe version of mrb_funcall.
*
...
...
@@ -1070,11 +1070,11 @@ MRB_API mrb_value mrb_funcall_id(mrb_state *mrb, mrb_value val, mrb_sym mid, mrb
* @return [mrb_value] mrb_value mruby function value.
* @see mrb_funcall
*/
MRB_API
mrb_value
mrb_funcall_argv
(
mrb_state
*
mrb
,
mrb_value
val
,
mrb_sym
name
,
mrb_
int
argc
,
const
mrb_value
*
argv
);
MRB_API
mrb_value
mrb_funcall_argv
(
mrb_state
*
mrb
,
mrb_value
val
,
mrb_sym
name
,
int
argc
,
const
mrb_value
*
argv
);
/**
* Call existing ruby functions with a block.
*/
MRB_API
mrb_value
mrb_funcall_with_block
(
mrb_state
*
mrb
,
mrb_value
val
,
mrb_sym
name
,
mrb_
int
argc
,
const
mrb_value
*
argv
,
mrb_value
block
);
MRB_API
mrb_value
mrb_funcall_with_block
(
mrb_state
*
mrb
,
mrb_value
val
,
mrb_sym
name
,
int
argc
,
const
mrb_value
*
argv
,
mrb_value
block
);
/**
* Create a symbol from C string. But usually it's better to use MRB_SYM(sym) and MRB_QSYM(qsym).
*
...
...
mrbgems/mruby-complex/src/complex.c
View file @
dd1ce5d5
...
...
@@ -122,7 +122,7 @@ complex_to_i(mrb_state *mrb, mrb_value self)
if
(
p
->
imaginary
!=
0
)
{
mrb_raisef
(
mrb
,
E_RANGE_ERROR
,
"can't convert %v into Float"
,
self
);
}
return
mrb_int_value
(
mrb
,
p
->
real
);
return
mrb_int_value
(
mrb
,
(
mrb_int
)
p
->
real
);
}
static
mrb_value
...
...
mrbgems/mruby-print/src/print.c
View file @
dd1ce5d5
...
...
@@ -22,7 +22,7 @@ printstr(mrb_state *mrb, const char *p, size_t len)
#if defined(_WIN32)
if
(
isatty
(
fileno
(
stdout
)))
{
DWORD
written
;
in
t
wlen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
p
,
len
,
NULL
,
0
);
size_
t
wlen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
p
,
len
,
NULL
,
0
);
wchar_t
*
utf16
=
(
wchar_t
*
)
mrb_malloc
(
mrb
,
(
wlen
+
1
)
*
sizeof
(
wchar_t
));
if
(
MultiByteToWideChar
(
CP_UTF8
,
0
,
p
,
len
,
utf16
,
wlen
)
>
0
)
{
utf16
[
wlen
]
=
0
;
...
...
src/class.c
View file @
dd1ce5d5
...
...
@@ -50,7 +50,7 @@ mt_new(mrb_state *mrb)
return
t
;
}
static
struct
mt_elem
*
mt_put
(
mrb_state
*
mrb
,
mt_tbl
*
t
,
mrb_sym
sym
,
in
t
func_p
,
union
mt_ptr
ptr
);
static
struct
mt_elem
*
mt_put
(
mrb_state
*
mrb
,
mt_tbl
*
t
,
mrb_sym
sym
,
size_
t
func_p
,
union
mt_ptr
ptr
);
static
void
mt_rehash
(
mrb_state
*
mrb
,
mt_tbl
*
t
)
...
...
@@ -81,7 +81,7 @@ mt_rehash(mrb_state *mrb, mt_tbl *t)
/* Set the value for the symbol in the method table. */
static
struct
mt_elem
*
mt_put
(
mrb_state
*
mrb
,
mt_tbl
*
t
,
mrb_sym
sym
,
in
t
func_p
,
union
mt_ptr
ptr
)
mt_put
(
mrb_state
*
mrb
,
mt_tbl
*
t
,
mrb_sym
sym
,
size_
t
func_p
,
union
mt_ptr
ptr
)
{
size_t
hash
,
pos
,
start
;
struct
mt_elem
*
dslot
=
NULL
;
...
...
src/vm.c
View file @
dd1ce5d5
...
...
@@ -333,7 +333,7 @@ static mrb_value mrb_run(mrb_state *mrb, const struct RProc* proc, mrb_value sel
#endif
MRB_API
mrb_value
mrb_funcall
(
mrb_state
*
mrb
,
mrb_value
self
,
const
char
*
name
,
mrb_
int
argc
,
...)
mrb_funcall
(
mrb_state
*
mrb
,
mrb_value
self
,
const
char
*
name
,
int
argc
,
...)
{
mrb_value
argv
[
MRB_FUNCALL_ARGC_MAX
];
va_list
ap
;
...
...
@@ -353,7 +353,7 @@ mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, mrb_int argc, ...)
}
MRB_API
mrb_value
mrb_funcall_id
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_sym
mid
,
mrb_
int
argc
,
...)
mrb_funcall_id
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_sym
mid
,
int
argc
,
...)
{
mrb_value
argv
[
MRB_FUNCALL_ARGC_MAX
];
va_list
ap
;
...
...
@@ -396,7 +396,7 @@ ci_nregs(mrb_callinfo *ci)
}
MRB_API
mrb_value
mrb_funcall_with_block
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_sym
mid
,
mrb_
int
argc
,
const
mrb_value
*
argv
,
mrb_value
blk
)
mrb_funcall_with_block
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_sym
mid
,
int
argc
,
const
mrb_value
*
argv
,
mrb_value
blk
)
{
mrb_value
val
;
int
ai
=
mrb_gc_arena_save
(
mrb
);
...
...
@@ -497,7 +497,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc
}
MRB_API
mrb_value
mrb_funcall_argv
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_sym
mid
,
mrb_
int
argc
,
const
mrb_value
*
argv
)
mrb_funcall_argv
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_sym
mid
,
int
argc
,
const
mrb_value
*
argv
)
{
return
mrb_funcall_with_block
(
mrb
,
self
,
mid
,
argc
,
argv
,
mrb_nil_value
());
}
...
...
@@ -849,7 +849,7 @@ argnum_error(mrb_state *mrb, mrb_int num)
{
mrb_value
exc
;
mrb_value
str
;
mrb_
int
argc
=
mrb
->
c
->
ci
->
argc
;
int
argc
=
mrb
->
c
->
ci
->
argc
;
if
(
argc
<
0
)
{
mrb_value
args
=
mrb
->
c
->
stack
[
1
];
...
...
@@ -1303,7 +1303,7 @@ RETRY_TRY_BLOCK:
struct
RBreak
*
brk
=
(
struct
RBreak
*
)
mrb
->
exc
;
mrb_value
target
=
mrb_break_value_get
(
brk
);
mrb_assert
(
mrb_integer_p
(
target
));
a
=
mrb_integer
(
target
);
a
=
(
uint32_t
)
mrb_integer
(
target
);
mrb_assert
(
a
>=
0
&&
a
<
irep
->
ilen
);
}
CHECKPOINT_MAIN
(
RBREAK_TAG_JUMP
)
{
...
...
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