mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_open): Use NUM2MODET() instead NUM2UINT().
* io.c (rb_scan_open_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
92c1dfd9d2
commit
4afa5fead8
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jan 28 11:23:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* io.c (rb_io_open): Use NUM2MODET() instead NUM2UINT().
|
||||||
|
* io.c (rb_scan_open_args): ditto.
|
||||||
|
|
||||||
Fri Jan 28 10:58:20 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Fri Jan 28 10:58:20 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* configure.in: Added mode_t type checking.
|
* configure.in: Added mode_t type checking.
|
||||||
|
|
4
io.c
4
io.c
|
@ -5420,7 +5420,7 @@ rb_scan_open_args(int argc, VALUE *argv,
|
||||||
|
|
||||||
rb_io_extract_modeenc(&vmode, &vperm, opt, &oflags, &fmode, convconfig_p);
|
rb_io_extract_modeenc(&vmode, &vperm, opt, &oflags, &fmode, convconfig_p);
|
||||||
|
|
||||||
perm = NIL_P(vperm) ? 0666 : NUM2UINT(vperm);
|
perm = NIL_P(vperm) ? 0666 : NUM2MODET(vperm);
|
||||||
|
|
||||||
*fname_p = fname;
|
*fname_p = fname;
|
||||||
*oflags_p = oflags;
|
*oflags_p = oflags;
|
||||||
|
@ -5696,7 +5696,7 @@ rb_io_open(VALUE filename, VALUE vmode, VALUE vperm, VALUE opt)
|
||||||
mode_t perm;
|
mode_t perm;
|
||||||
|
|
||||||
rb_io_extract_modeenc(&vmode, &vperm, opt, &oflags, &fmode, &convconfig);
|
rb_io_extract_modeenc(&vmode, &vperm, opt, &oflags, &fmode, &convconfig);
|
||||||
perm = NIL_P(vperm) ? 0666 : NUM2UINT(vperm);
|
perm = NIL_P(vperm) ? 0666 : NUM2MODET(vperm);
|
||||||
|
|
||||||
if (!NIL_P(cmd = check_pipe_command(filename))) {
|
if (!NIL_P(cmd = check_pipe_command(filename))) {
|
||||||
return pipe_open_s(cmd, rb_io_oflags_modestr(oflags), fmode, &convconfig);
|
return pipe_open_s(cmd, rb_io_oflags_modestr(oflags), fmode, &convconfig);
|
||||||
|
|
Loading…
Add table
Reference in a new issue