[uim-commit] r1877 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Oct 23 23:43:58 PDT 2005
Author: yamaken
Date: 2005-10-23 23:43:44 -0700 (Sun, 23 Oct 2005)
New Revision: 1877
Modified:
branches/r5rs/sigscheme/fileport.c
branches/r5rs/sigscheme/fileport.h
Log:
* sigscheme/fileport.h
- (ScmFilePort_vtbl): Removed
- (ScmFilePort_vptr): New variable decl
* sigscheme/fileport.c
- (ScmFilePort_vptr): New variable
- (ScmFilePort_vtbl): Make static
- (ScmFilePort_new, fileport_dyn_cast): Follow the introduction of
ScmFilePort_vptr
Modified: branches/r5rs/sigscheme/fileport.c
===================================================================
--- branches/r5rs/sigscheme/fileport.c 2005-10-23 14:59:45 UTC (rev 1876)
+++ branches/r5rs/sigscheme/fileport.c 2005-10-24 06:43:44 UTC (rev 1877)
@@ -85,7 +85,7 @@
/*=======================================
Variable Declarations
=======================================*/
-const ScmBytePortVTbl ScmFilePort_vtbl = {
+static const ScmBytePortVTbl ScmFilePort_vtbl = {
&fileport_dyn_cast,
&fileport_close,
&fileport_get_byte,
@@ -96,6 +96,7 @@
&fileport_write,
&fileport_flush
};
+const ScmBytePortVTbl *ScmFilePort_vptr = &ScmFilePort_vtbl;
/*=======================================
Function Implementations
@@ -108,7 +109,7 @@
port = malloc(sizeof(ScmFilePort));
if (port) {
- port->vptr = &ScmFilePort_vtbl;
+ port->vptr = ScmFilePort_vptr;
port->file = file;
}
@@ -124,7 +125,7 @@
{
ScmBytePort *cast;
- cast = (dst_vptr == &ScmFilePort_vtbl) ? bport : NULL;
+ cast = (dst_vptr == ScmFilePort_vptr) ? bport : NULL;
if (!cast)
SCM_BYTEPORT_ERROR(bport, "invalid object is passed to a ScmFilePort method");
Modified: branches/r5rs/sigscheme/fileport.h
===================================================================
--- branches/r5rs/sigscheme/fileport.h 2005-10-23 14:59:45 UTC (rev 1876)
+++ branches/r5rs/sigscheme/fileport.h 2005-10-24 06:43:44 UTC (rev 1877)
@@ -62,7 +62,7 @@
/*=======================================
Variable Declarations
=======================================*/
-extern const ScmBytePortVTbl ScmFilePort_vtbl;
+extern const ScmBytePortVTbl *ScmFilePort_vptr;
/*=======================================
Function Declarations
More information about the uim-commit
mailing list