mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/intern.h (rb_file_open_str): declared.
* io.c (rb_file_open_str): defined. * ext/zlib/zlib.c (gzfile_s_open): use rb_file_open_str instead of rb_file_open. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
64b633f069
commit
dac421a9c9
4 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
Thu Sep 4 23:42:42 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* include/ruby/intern.h (rb_file_open_str): declared.
|
||||||
|
|
||||||
|
* io.c (rb_file_open_str): defined.
|
||||||
|
|
||||||
|
* ext/zlib/zlib.c (gzfile_s_open): use rb_file_open_str instead of
|
||||||
|
rb_file_open.
|
||||||
|
|
||||||
Thu Sep 4 23:18:55 2008 Tanaka Akira <akr@fsij.org>
|
Thu Sep 4 23:18:55 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* enc/trans/newline.trans: record newline types met in universal
|
* enc/trans/newline.trans: record newline types met in universal
|
||||||
|
|
|
@ -2294,7 +2294,7 @@ gzfile_s_open(int argc, VALUE *argv, VALUE klass, const char *mode)
|
||||||
}
|
}
|
||||||
filename = argv[0];
|
filename = argv[0];
|
||||||
FilePathValue(filename);
|
FilePathValue(filename);
|
||||||
io = rb_file_open(RSTRING_PTR(filename), mode);
|
io = rb_file_open_str(filename, mode);
|
||||||
|
|
||||||
argv[0] = io;
|
argv[0] = io;
|
||||||
return rb_gzfile_s_wrap(argc, argv, klass);
|
return rb_gzfile_s_wrap(argc, argv, klass);
|
||||||
|
|
|
@ -387,6 +387,7 @@ VALUE rb_io_print(int, VALUE*, VALUE);
|
||||||
VALUE rb_io_puts(int, VALUE*, VALUE);
|
VALUE rb_io_puts(int, VALUE*, VALUE);
|
||||||
VALUE rb_io_fdopen(int, int, const char*);
|
VALUE rb_io_fdopen(int, int, const char*);
|
||||||
VALUE rb_file_open(const char*, const char*);
|
VALUE rb_file_open(const char*, const char*);
|
||||||
|
VALUE rb_file_open_str(VALUE, const char*);
|
||||||
VALUE rb_gets(void);
|
VALUE rb_gets(void);
|
||||||
void rb_write_error(const char*);
|
void rb_write_error(const char*);
|
||||||
void rb_write_error2(const char*, long);
|
void rb_write_error2(const char*, long);
|
||||||
|
|
6
io.c
6
io.c
|
@ -4050,6 +4050,12 @@ rb_file_open_internal(VALUE io, VALUE filename, const char *mode)
|
||||||
0666);
|
0666);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE
|
||||||
|
rb_file_open_str(VALUE fname, const char *mode)
|
||||||
|
{
|
||||||
|
return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
|
||||||
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_file_open(const char *fname, const char *mode)
|
rb_file_open(const char *fname, const char *mode)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue