diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-25 12:17:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-25 12:17:39 +0000 |
commit | b0e0f45571d509a3d76732b76aa63a96ad6b371f (patch) | |
tree | 11a9c00880ee065d5a03b1306e4d82f7872ab973 /rubyio.h | |
parent | 61deeb37417b040e93cb258e58d1a5777055842b (diff) | |
download | ruby-b0e0f45571d509a3d76732b76aa63a96ad6b371f.tar.gz |
* gc.c (obj_free), io.c (rb_io_fptr_finalize), rubyio.h (OpenFile):
sharing OpenFile.
* io.c (rb_io_initialize): accept IO instance. [ruby-dev:22195]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rubyio.h')
-rw-r--r-- | rubyio.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -24,6 +24,7 @@ typedef struct OpenFile { int lineno; /* number of lines read */ char *path; /* pathname for file */ void (*finalize) _((struct OpenFile*,int)); /* finalize proc */ + long refcnt; } OpenFile; #define FMODE_READABLE 1 @@ -50,6 +51,7 @@ typedef struct OpenFile { fp->lineno = 0;\ fp->path = NULL;\ fp->finalize = 0;\ + fp->refcnt = 1;\ } while (0) #define GetReadFile(fptr) ((fptr)->f) |