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
029e3c9f
Commit
029e3c9f
authored
Apr 01, 2013
by
Masaki Muranaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use mrb_raise() as possible instead of mrb_raisef().
parent
06b4b1cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/vm.c
src/vm.c
+6
-3
No files found.
src/vm.c
View file @
029e3c9f
...
...
@@ -55,6 +55,9 @@ The value below allows about 60000 recursive calls in the simplest case. */
# define DEBUG(x)
#endif
#define TO_STR(x) TO_STR_(x)
#define TO_STR_(x) #x
static
inline
void
stack_clear
(
mrb_value
*
from
,
size_t
count
)
{
...
...
@@ -133,9 +136,9 @@ stack_extend(mrb_state *mrb, int room, int keep)
mrb
->
stend
=
mrb
->
stbase
+
size
;
envadjust
(
mrb
,
oldbase
,
mrb
->
stbase
);
/* Raise an exception if the new stack size will be too large,
to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise
f
has stack space to work with. */
to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */
if
(
size
>
MRB_STACK_MAX
)
{
mrb_raise
f
(
mrb
,
E_RUNTIME_ERROR
,
"stack level too deep. (limit=%S)"
,
mrb_fixnum_value
(
MRB_STACK_MAX
)
);
mrb_raise
(
mrb
,
E_RUNTIME_ERROR
,
"stack level too deep. (limit="
TO_STR
(
MRB_STACK_MAX
)
")"
);
}
}
...
...
@@ -275,7 +278,7 @@ mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, int argc, ...)
int
i
;
if
(
argc
>
MRB_FUNCALL_ARGC_MAX
)
{
mrb_raise
f
(
mrb
,
E_ARGUMENT_ERROR
,
"Too long arguments. (limit=%S)"
,
mrb_fixnum_value
(
MRB_FUNCALL_ARGC_MAX
)
);
mrb_raise
(
mrb
,
E_ARGUMENT_ERROR
,
"Too long arguments. (limit="
TO_STR
(
MRB_FUNCALL_ARGC_MAX
)
")"
);
}
va_start
(
ap
,
argc
);
...
...
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