aboutsummaryrefslogtreecommitdiffstats
path: root/rubyio.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-25 12:17:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-25 12:17:39 +0000
commitb0e0f45571d509a3d76732b76aa63a96ad6b371f (patch)
tree11a9c00880ee065d5a03b1306e4d82f7872ab973 /rubyio.h
parent61deeb37417b040e93cb258e58d1a5777055842b (diff)
downloadruby-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/rubyio.h b/rubyio.h
index 26f86b0d07..d3b71fb767 100644
--- a/rubyio.h
+++ b/rubyio.h
@@ -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)