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
d9d6b2c7
Commit
d9d6b2c7
authored
Feb 27, 2013
by
NARUSE, Yui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add document for array_copy
parent
d3418a7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
src/array.c
src/array.c
+14
-0
No files found.
src/array.c
View file @
d9d6b2c7
...
@@ -63,6 +63,20 @@ mrb_ary_new(mrb_state *mrb)
...
@@ -63,6 +63,20 @@ mrb_ary_new(mrb_state *mrb)
return
mrb_ary_new_capa
(
mrb
,
0
);
return
mrb_ary_new_capa
(
mrb
,
0
);
}
}
/*
* to copy array, use this instead of memcpy because of portability
* * gcc on ARM may fail optimization of memcpy
* http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3934.html
* * gcc on MIPS also fail
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39755
* * memcpy doesn't exist on freestanding environment
*
* If you optimize for binary size, use memcpy instead of this at your own risk
* of above portability issue.
*
* see also http://togetter.com/li/462898
*
*/
static
inline
void
static
inline
void
array_copy
(
mrb_value
*
dst
,
const
mrb_value
*
src
,
size_t
size
)
array_copy
(
mrb_value
*
dst
,
const
mrb_value
*
src
,
size_t
size
)
{
{
...
...
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