mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
io.c: constify
* io.c (rb_file_open_generic, pipe_open, pipe_open_s): constify convconfig parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6ee8ec7069
commit
e7cf203103
1 changed files with 6 additions and 3 deletions
9
io.c
9
io.c
|
@ -5565,7 +5565,8 @@ io_set_encoding_by_bom(VALUE io)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_file_open_generic(VALUE io, VALUE filename, int oflags, int fmode, convconfig_t *convconfig, mode_t perm)
|
rb_file_open_generic(VALUE io, VALUE filename, int oflags, int fmode,
|
||||||
|
const convconfig_t *convconfig, mode_t perm)
|
||||||
{
|
{
|
||||||
rb_io_t *fptr;
|
rb_io_t *fptr;
|
||||||
convconfig_t cc;
|
convconfig_t cc;
|
||||||
|
@ -5876,7 +5877,8 @@ rb_execarg_fixup_v(VALUE execarg_obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
pipe_open(VALUE execarg_obj, const char *modestr, int fmode, convconfig_t *convconfig)
|
pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
|
||||||
|
const convconfig_t *convconfig)
|
||||||
{
|
{
|
||||||
struct rb_execarg *eargp = NIL_P(execarg_obj) ? NULL : rb_execarg_get(execarg_obj);
|
struct rb_execarg *eargp = NIL_P(execarg_obj) ? NULL : rb_execarg_get(execarg_obj);
|
||||||
VALUE prog = eargp ? (eargp->use_shell ? eargp->invoke.sh.shell_script : eargp->invoke.cmd.command_name) : Qfalse ;
|
VALUE prog = eargp ? (eargp->use_shell ? eargp->invoke.sh.shell_script : eargp->invoke.cmd.command_name) : Qfalse ;
|
||||||
|
@ -6126,7 +6128,8 @@ is_popen_fork(VALUE prog)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
pipe_open_s(VALUE prog, const char *modestr, int fmode, convconfig_t *convconfig)
|
pipe_open_s(VALUE prog, const char *modestr, int fmode,
|
||||||
|
const convconfig_t *convconfig)
|
||||||
{
|
{
|
||||||
int argc = 1;
|
int argc = 1;
|
||||||
VALUE *argv = &prog;
|
VALUE *argv = &prog;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue