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
ab4baba2
Unverified
Commit
ab4baba2
authored
Jan 02, 2022
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Jan 02, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5620 from dearblue/adjust-stacks
Adjusting the stack for after it enters the virtual machine
parents
28ccc664
d3b7601a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/class.c
src/class.c
+11
-0
No files found.
src/class.c
View file @
ab4baba2
...
...
@@ -929,6 +929,13 @@ mrb_block_given_p(mrb_state *mrb)
MRB_API
mrb_int
mrb_get_args
(
mrb_state
*
mrb
,
const
char
*
format
,
...)
{
#define ADJUST_STACK() do { \
if (argv_on_stack) { \
ci = mrb->c->ci; \
argv = mrb->c->ci->stack + 1; \
} \
} while (0)
const
char
*
fmt
=
format
;
char
c
;
int
i
=
0
;
...
...
@@ -1191,6 +1198,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
p
=
va_arg
(
ap
,
mrb_float
*
);
if
(
pickarg
)
{
*
p
=
mrb_as_float
(
mrb
,
*
pickarg
);
ADJUST_STACK
();
}
}
break
;
...
...
@@ -1202,6 +1210,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
p
=
va_arg
(
ap
,
mrb_int
*
);
if
(
pickarg
)
{
*
p
=
mrb_as_int
(
mrb
,
*
pickarg
);
ADJUST_STACK
();
}
}
break
;
...
...
@@ -1364,6 +1373,8 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
finish:
va_end
(
ap
);
return
i
;
#undef ADJUST_STACK
}
static
struct
RClass
*
...
...
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