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
9174b18f
Commit
9174b18f
authored
Jan 01, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `mrb_num_args_error` to `mrb_argnum_error`; ref #4863
parent
b9c78c3f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
+8
-8
include/mruby.h
include/mruby.h
+1
-1
mrbgems/mruby-io/src/io.c
mrbgems/mruby-io/src/io.c
+1
-1
mrbgems/mruby-socket/src/socket.c
mrbgems/mruby-socket/src/socket.c
+1
-1
mrbgems/mruby-struct/src/struct.c
mrbgems/mruby-struct/src/struct.c
+1
-1
src/error.c
src/error.c
+2
-2
src/hash.c
src/hash.c
+1
-1
src/kernel.c
src/kernel.c
+1
-1
No files found.
include/mruby.h
View file @
9174b18f
...
...
@@ -1232,7 +1232,7 @@ MRB_API mrb_noreturn void mrb_raise(mrb_state *mrb, struct RClass *c, const char
MRB_API
mrb_noreturn
void
mrb_raisef
(
mrb_state
*
mrb
,
struct
RClass
*
c
,
const
char
*
fmt
,
...);
MRB_API
mrb_noreturn
void
mrb_name_error
(
mrb_state
*
mrb
,
mrb_sym
id
,
const
char
*
fmt
,
...);
MRB_API
mrb_noreturn
void
mrb_frozen_error
(
mrb_state
*
mrb
,
void
*
frozen_obj
);
MRB_API
mrb_noreturn
void
mrb_
num_args
_error
(
mrb_state
*
mrb
,
mrb_int
argc
,
int
min
,
int
max
);
MRB_API
mrb_noreturn
void
mrb_
argnum
_error
(
mrb_state
*
mrb
,
mrb_int
argc
,
int
min
,
int
max
);
MRB_API
void
mrb_warn
(
mrb_state
*
mrb
,
const
char
*
fmt
,
...);
MRB_API
mrb_noreturn
void
mrb_bug
(
mrb_state
*
mrb
,
const
char
*
fmt
,
...);
MRB_API
void
mrb_print_backtrace
(
mrb_state
*
mrb
);
...
...
mrbgems/mruby-io/src/io.c
View file @
9174b18f
...
...
@@ -1047,7 +1047,7 @@ mrb_io_s_select(mrb_state *mrb, mrb_value klass)
mrb_get_args
(
mrb
,
"*"
,
&
argv
,
&
argc
);
if
(
argc
<
1
||
argc
>
4
)
{
mrb_
num_args
_error
(
mrb
,
argc
,
1
,
4
);
mrb_
argnum
_error
(
mrb
,
argc
,
1
,
4
);
}
timeout
=
mrb_nil_value
();
...
...
mrbgems/mruby-socket/src/socket.c
View file @
9174b18f
...
...
@@ -476,7 +476,7 @@ mrb_basicsocket_setsockopt(mrb_state *mrb, mrb_value self)
optname
=
mrb_fixnum
(
mrb_funcall
(
mrb
,
so
,
"optname"
,
0
));
optval
=
mrb_funcall
(
mrb
,
so
,
"data"
,
0
);
}
else
{
mrb_
num_args
_error
(
mrb
,
argc
,
3
,
3
);
mrb_
argnum
_error
(
mrb
,
argc
,
3
,
3
);
}
s
=
socket_fd
(
mrb
,
self
);
...
...
mrbgems/mruby-struct/src/struct.c
View file @
9174b18f
...
...
@@ -274,7 +274,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass)
name
=
mrb_nil_value
();
mrb_get_args
(
mrb
,
"*&"
,
&
argv
,
&
argc
,
&
b
);
if
(
argc
==
0
)
{
/* special case to avoid crash */
mrb_
num_args
_error
(
mrb
,
argc
,
1
,
-
1
);
mrb_
argnum
_error
(
mrb
,
argc
,
1
,
-
1
);
}
else
{
pargv
=
argv
;
...
...
src/error.c
View file @
9174b18f
...
...
@@ -481,7 +481,7 @@ exception_call:
break
;
default:
mrb_
num_args
_error
(
mrb
,
argc
,
0
,
3
);
mrb_
argnum
_error
(
mrb
,
argc
,
0
,
3
);
break
;
}
if
(
argc
>
0
)
{
...
...
@@ -538,7 +538,7 @@ mrb_frozen_error(mrb_state *mrb, void *frozen_obj)
}
MRB_API
mrb_noreturn
void
mrb_
num_args
_error
(
mrb_state
*
mrb
,
mrb_int
argc
,
int
min
,
int
max
)
mrb_
argnum
_error
(
mrb_state
*
mrb
,
mrb_int
argc
,
int
min
,
int
max
)
{
#define FMT(exp) "wrong number of arguments (given %i, expected " exp ")"
if
(
min
==
max
)
...
...
src/hash.c
View file @
9174b18f
...
...
@@ -800,7 +800,7 @@ mrb_hash_init(mrb_state *mrb, mrb_value hash)
mrb_hash_modify
(
mrb
,
hash
);
if
(
!
mrb_nil_p
(
block
))
{
if
(
ifnone_p
)
{
mrb_
num_args
_error
(
mrb
,
1
,
0
,
0
);
mrb_
argnum
_error
(
mrb
,
1
,
0
,
0
);
}
RHASH
(
hash
)
->
flags
|=
MRB_HASH_PROC_DEFAULT
;
ifnone
=
block
;
...
...
src/kernel.c
View file @
9174b18f
...
...
@@ -384,7 +384,7 @@ mrb_obj_extend(mrb_state *mrb, mrb_int argc, mrb_value *argv, mrb_value obj)
mrb_int
i
;
if
(
argc
==
0
)
{
mrb_
num_args
_error
(
mrb
,
argc
,
1
,
-
1
);
mrb_
argnum
_error
(
mrb
,
argc
,
1
,
-
1
);
}
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
mrb_check_type
(
mrb
,
argv
[
i
],
MRB_TT_MODULE
);
...
...
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