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
52dd0a8c
Unverified
Commit
52dd0a8c
authored
Jun 25, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip `mrb_get_args()` in `mrb_ary_push()`.
parent
6db0162e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/array.c
src/array.c
+6
-4
No files found.
src/array.c
View file @
52dd0a8c
...
@@ -508,19 +508,21 @@ mrb_ary_push(mrb_state *mrb, mrb_value ary, mrb_value elem)
...
@@ -508,19 +508,21 @@ mrb_ary_push(mrb_state *mrb, mrb_value ary, mrb_value elem)
static
mrb_value
static
mrb_value
mrb_ary_push_m
(
mrb_state
*
mrb
,
mrb_value
self
)
mrb_ary_push_m
(
mrb_state
*
mrb
,
mrb_value
self
)
{
{
mrb_int
argc
;
mrb_value
*
argv
;
mrb_value
*
argv
;
mrb_int
len
,
len2
,
alen
;
mrb_int
len
,
len2
;
struct
RArray
*
a
;
struct
RArray
*
a
;
mrb_get_args
(
mrb
,
"*!"
,
&
argv
,
&
alen
);
argc
=
mrb_get_argc
(
mrb
);
argv
=
mrb_get_argv
(
mrb
);
a
=
mrb_ary_ptr
(
self
);
a
=
mrb_ary_ptr
(
self
);
ary_modify
(
mrb
,
a
);
ary_modify
(
mrb
,
a
);
len
=
ARY_LEN
(
a
);
len
=
ARY_LEN
(
a
);
len2
=
len
+
a
len
;
len2
=
len
+
a
rgc
;
if
(
ARY_CAPA
(
a
)
<
len2
)
{
if
(
ARY_CAPA
(
a
)
<
len2
)
{
ary_expand_capa
(
mrb
,
a
,
len2
);
ary_expand_capa
(
mrb
,
a
,
len2
);
}
}
array_copy
(
ARY_PTR
(
a
)
+
len
,
argv
,
a
len
);
array_copy
(
ARY_PTR
(
a
)
+
len
,
argv
,
a
rgc
);
ARY_SET_LEN
(
a
,
len2
);
ARY_SET_LEN
(
a
,
len2
);
while
(
alen
--
)
{
while
(
alen
--
)
{
mrb_field_write_barrier_value
(
mrb
,
(
struct
RBasic
*
)
a
,
*
argv
);
mrb_field_write_barrier_value
(
mrb
,
(
struct
RBasic
*
)
a
,
*
argv
);
...
...
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