summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 14:43:45 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 14:43:45 +0000
commit8eada2f83661254768573e08ea1c5665b936899c (patch)
tree471b97f04e17f7a7fb5bb2342f611c2be36c348e /io.c
parent157bd36c77151d98a33543155ead77fb1813d1d3 (diff)
downloadruby-8eada2f83661254768573e08ea1c5665b936899c.tar.gz
ruby-8eada2f83661254768573e08ea1c5665b936899c.tar.xz
ruby-8eada2f83661254768573e08ea1c5665b936899c.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@19137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io.c b/io.c
index 4c8f41a92..ced821a6b 100644
--- a/io.c
+++ b/io.c
@@ -4051,6 +4051,12 @@ rb_file_open_internal(VALUE io, VALUE filename, const char *mode)
}
VALUE
+rb_file_open_str(VALUE fname, const char *mode)
+{
+ return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
+}
+
+VALUE
rb_file_open(const char *fname, const char *mode)
{
return rb_file_open_internal(io_alloc(rb_cFile), rb_str_new_cstr(fname), mode);