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
c9a4091b
Commit
c9a4091b
authored
Nov 24, 2015
by
Tomoyuki Sahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arguments can be shared strings.
parent
1f4bd9fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/file.c
src/file.c
+4
-2
No files found.
src/file.c
View file @
c9a4091b
...
...
@@ -298,14 +298,16 @@ mrb_file_s_symlink(mrb_state *mrb, mrb_value klass)
#else
mrb_value
from
,
to
;
const
char
*
src
,
*
dst
;
int
ai
=
mrb_gc_arena_save
(
mrb
);
mrb_get_args
(
mrb
,
"SS"
,
&
from
,
&
to
);
src
=
mrb_str
ing_value_cstr
(
mrb
,
&
from
);
dst
=
mrb_str
ing_value_cstr
(
mrb
,
&
to
);
src
=
mrb_str
_to_cstr
(
mrb
,
from
);
dst
=
mrb_str
_to_cstr
(
mrb
,
to
);
if
(
symlink
(
src
,
dst
)
<
0
)
{
mrb_sys_fail
(
mrb
,
mrb_str_to_cstr
(
mrb
,
mrb_format
(
mrb
,
"(%S, %S)"
,
from
,
to
)));
}
mrb_gc_arena_restore
(
mrb
,
ai
);
#endif
return
mrb_fixnum_value
(
0
);
}
...
...
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