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
ce12ef7e
Unverified
Commit
ce12ef7e
authored
Feb 01, 2020
by
dearblue
Committed by
Yukihiro "Matz" Matsumoto
Jun 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hiding method implementation C functions in mruby-io
parent
8bca11a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
35 deletions
+35
-35
mrbgems/mruby-io/src/file.c
mrbgems/mruby-io/src/file.c
+3
-3
mrbgems/mruby-io/src/file_test.c
mrbgems/mruby-io/src/file_test.c
+9
-9
mrbgems/mruby-io/src/io.c
mrbgems/mruby-io/src/io.c
+22
-22
mrbgems/mruby-io/test/mruby_io_test.c
mrbgems/mruby-io/test/mruby_io_test.c
+1
-1
No files found.
mrbgems/mruby-io/src/file.c
View file @
ce12ef7e
...
...
@@ -89,7 +89,7 @@ flock(int fd, int operation) {
}
#endif
mrb_value
static
mrb_value
mrb_file_s_umask
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#if defined(_WIN32) || defined(_WIN64)
...
...
@@ -265,7 +265,7 @@ mrb_file_realpath(mrb_state *mrb, mrb_value klass)
return
result
;
}
mrb_value
static
mrb_value
mrb_file__getwd
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
mrb_value
path
;
...
...
@@ -401,7 +401,7 @@ mrb_file_mtime(mrb_state *mrb, mrb_value self)
return
mrb_funcall
(
mrb
,
obj
,
"at"
,
1
,
mrb_fixnum_value
(
st
.
st_mtime
));
}
mrb_value
static
mrb_value
mrb_file_flock
(
mrb_state
*
mrb
,
mrb_value
self
)
{
#if defined(sun)
...
...
mrbgems/mruby-io/src/file_test.c
View file @
ce12ef7e
...
...
@@ -85,7 +85,7 @@ mrb_lstat(mrb_state *mrb, mrb_value obj, struct stat *st)
* File.directory?(".")
*/
mrb_value
static
mrb_value
mrb_filetest_s_directory_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#ifndef S_ISDIR
...
...
@@ -112,7 +112,7 @@ mrb_filetest_s_directory_p(mrb_state *mrb, mrb_value klass)
* Returns <code>true</code> if the named file is a pipe.
*/
mrb_value
static
mrb_value
mrb_filetest_s_pipe_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#if defined(_WIN32) || defined(_WIN64)
...
...
@@ -145,7 +145,7 @@ mrb_filetest_s_pipe_p(mrb_state *mrb, mrb_value klass)
* Returns <code>true</code> if the named file is a symbolic link.
*/
mrb_value
static
mrb_value
mrb_filetest_s_symlink_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#if defined(_WIN32) || defined(_WIN64)
...
...
@@ -188,7 +188,7 @@ mrb_filetest_s_symlink_p(mrb_state *mrb, mrb_value klass)
* Returns <code>true</code> if the named file is a socket.
*/
mrb_value
static
mrb_value
mrb_filetest_s_socket_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#if defined(_WIN32) || defined(_WIN64)
...
...
@@ -232,7 +232,7 @@ mrb_filetest_s_socket_p(mrb_state *mrb, mrb_value klass)
* Return <code>true</code> if the named file exists.
*/
mrb_value
static
mrb_value
mrb_filetest_s_exist_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
struct
stat
st
;
...
...
@@ -253,7 +253,7 @@ mrb_filetest_s_exist_p(mrb_state *mrb, mrb_value klass)
* regular file.
*/
mrb_value
static
mrb_value
mrb_filetest_s_file_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#ifndef S_ISREG
...
...
@@ -281,7 +281,7 @@ mrb_filetest_s_file_p(mrb_state *mrb, mrb_value klass)
* a zero size.
*/
mrb_value
static
mrb_value
mrb_filetest_s_zero_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
struct
stat
st
;
...
...
@@ -306,7 +306,7 @@ mrb_filetest_s_zero_p(mrb_state *mrb, mrb_value klass)
* _file_name_ can be an IO object.
*/
mrb_value
static
mrb_value
mrb_filetest_s_size
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
struct
stat
st
;
...
...
@@ -328,7 +328,7 @@ mrb_filetest_s_size(mrb_state *mrb, mrb_value klass)
* file otherwise.
*/
mrb_value
static
mrb_value
mrb_filetest_s_size_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
struct
stat
st
;
...
...
mrbgems/mruby-io/src/io.c
View file @
ce12ef7e
...
...
@@ -341,7 +341,7 @@ option_to_fd(mrb_state *mrb, mrb_value hash, const char *key)
}
#ifdef _WIN32
mrb_value
static
mrb_value
mrb_io_s_popen
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
mrb_value
cmd
,
io
;
...
...
@@ -439,14 +439,14 @@ mrb_io_s_popen(mrb_state *mrb, mrb_value klass)
return
io
;
}
#elif defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
mrb_value
static
mrb_value
mrb_io_s_popen
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
mrb_raise
(
mrb
,
E_NOTIMP_ERROR
,
"IO#popen is not supported on the platform"
);
return
mrb_false_value
();
}
#else
mrb_value
static
mrb_value
mrb_io_s_popen
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
mrb_value
cmd
,
io
,
result
;
...
...
@@ -596,7 +596,7 @@ mrb_dup(mrb_state *mrb, int fd, mrb_bool *failed)
return
new_fd
;
}
mrb_value
static
mrb_value
mrb_io_initialize_copy
(
mrb_state
*
mrb
,
mrb_value
copy
)
{
mrb_value
orig
;
...
...
@@ -682,7 +682,7 @@ badfd:
mrb_sys_fail
(
mrb
,
"bad file descriptor"
);
}
mrb_value
static
mrb_value
mrb_io_initialize
(
mrb_state
*
mrb
,
mrb_value
io
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -785,7 +785,7 @@ fptr_finalize(mrb_state *mrb, struct mrb_io *fptr, int quiet)
}
}
mrb_value
static
mrb_value
mrb_io_check_readable
(
mrb_state
*
mrb
,
mrb_value
self
)
{
struct
mrb_io
*
fptr
=
io_get_open_fptr
(
mrb
,
self
);
...
...
@@ -795,7 +795,7 @@ mrb_io_check_readable(mrb_state *mrb, mrb_value self)
return
mrb_nil_value
();
}
mrb_value
static
mrb_value
mrb_io_isatty
(
mrb_state
*
mrb
,
mrb_value
self
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -806,7 +806,7 @@ mrb_io_isatty(mrb_state *mrb, mrb_value self)
return
mrb_true_value
();
}
mrb_value
static
mrb_value
mrb_io_s_for_fd
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
struct
RClass
*
c
=
mrb_class_ptr
(
klass
);
...
...
@@ -819,7 +819,7 @@ mrb_io_s_for_fd(mrb_state *mrb, mrb_value klass)
return
mrb_io_initialize
(
mrb
,
obj
);
}
mrb_value
static
mrb_value
mrb_io_s_sysclose
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
mrb_int
fd
;
...
...
@@ -830,7 +830,7 @@ mrb_io_s_sysclose(mrb_state *mrb, mrb_value klass)
return
mrb_fixnum_value
(
0
);
}
int
static
int
mrb_cloexec_open
(
mrb_state
*
mrb
,
const
char
*
pathname
,
mrb_int
flags
,
mrb_int
mode
)
{
int
fd
,
retry
=
FALSE
;
...
...
@@ -865,7 +865,7 @@ reopen:
return
fd
;
}
mrb_value
static
mrb_value
mrb_io_s_sysopen
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
mrb_value
path
=
mrb_nil_value
();
...
...
@@ -895,7 +895,7 @@ mrb_sysread_dummy(int fd, void *buf, fsize_t nbytes, off_t offset)
return
(
mrb_io_read_write_size
)
read
(
fd
,
buf
,
nbytes
);
}
mrb_value
static
mrb_value
mrb_io_sysread
(
mrb_state
*
mrb
,
mrb_value
io
)
{
mrb_value
buf
=
mrb_nil_value
();
...
...
@@ -949,7 +949,7 @@ mrb_io_sysread_common(mrb_state *mrb,
return
buf
;
}
mrb_value
static
mrb_value
mrb_io_sysseek
(
mrb_state
*
mrb
,
mrb_value
io
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -1009,7 +1009,7 @@ mrb_syswrite_dummy(int fd, const void *buf, fsize_t nbytes, off_t offset)
return
(
mrb_io_read_write_size
)
write
(
fd
,
buf
,
nbytes
);
}
mrb_value
static
mrb_value
mrb_io_syswrite
(
mrb_state
*
mrb
,
mrb_value
io
)
{
mrb_value
buf
;
...
...
@@ -1019,7 +1019,7 @@ mrb_io_syswrite(mrb_state *mrb, mrb_value io)
return
mrb_io_syswrite_common
(
mrb
,
mrb_syswrite_dummy
,
io
,
buf
,
0
);
}
mrb_value
static
mrb_value
mrb_io_close
(
mrb_state
*
mrb
,
mrb_value
self
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -1028,7 +1028,7 @@ mrb_io_close(mrb_state *mrb, mrb_value self)
return
mrb_nil_value
();
}
mrb_value
static
mrb_value
mrb_io_close_write
(
mrb_state
*
mrb
,
mrb_value
self
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -1039,7 +1039,7 @@ mrb_io_close_write(mrb_state *mrb, mrb_value self)
return
mrb_nil_value
();
}
mrb_value
static
mrb_value
mrb_io_closed
(
mrb_state
*
mrb
,
mrb_value
io
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -1051,7 +1051,7 @@ mrb_io_closed(mrb_state *mrb, mrb_value io)
return
mrb_true_value
();
}
mrb_value
static
mrb_value
mrb_io_pid
(
mrb_state
*
mrb
,
mrb_value
io
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -1317,7 +1317,7 @@ mrb_io_fileno_m(mrb_state *mrb, mrb_value io)
return
mrb_fixnum_value
(
fd
);
}
mrb_value
static
mrb_value
mrb_io_close_on_exec_p
(
mrb_state
*
mrb
,
mrb_value
self
)
{
#if defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
...
...
@@ -1341,7 +1341,7 @@ mrb_io_close_on_exec_p(mrb_state *mrb, mrb_value self)
#endif
}
mrb_value
static
mrb_value
mrb_io_set_close_on_exec
(
mrb_state
*
mrb
,
mrb_value
self
)
{
#if defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
...
...
@@ -1377,7 +1377,7 @@ mrb_io_set_close_on_exec(mrb_state *mrb, mrb_value self)
#endif
}
mrb_value
static
mrb_value
mrb_io_set_sync
(
mrb_state
*
mrb
,
mrb_value
self
)
{
struct
mrb_io
*
fptr
;
...
...
@@ -1389,7 +1389,7 @@ mrb_io_set_sync(mrb_state *mrb, mrb_value self)
return
mrb_bool_value
(
b
);
}
mrb_value
static
mrb_value
mrb_io_sync
(
mrb_state
*
mrb
,
mrb_value
self
)
{
struct
mrb_io
*
fptr
;
...
...
mrbgems/mruby-io/test/mruby_io_test.c
View file @
ce12ef7e
...
...
@@ -210,7 +210,7 @@ mrb_io_test_rmdir(mrb_state *mrb, mrb_value klass)
return
mrb_true_value
();
}
mrb_value
static
mrb_value
mrb_io_win_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#if defined(_WIN32) || defined(_WIN64)
...
...
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