Replacing cport with a vtable object
Matthew Dempsky <[email protected]> 15 Mar 2004 11:51:51 -0600
| Newsgroups | gmane.lisp.scheme.pika.devel |
|---|---|
| Message-ID | <[email protected]> |
So basically we'll have something like:
struct scm_port_binary_data
{
int fd;
enum uni_encoding_scheme enc;
};
along with
struct scm_port_vtable
{
sizeof (scm_port_binary_data), 0, 0, 0,
SCM_VTABLE_DISCIPLINE_INITIALIZERS (scm_port_)
};
and then all the scm_port_* functions. Also, struct cport* everywhere
gets changed to t_scm_word *. The functions that actually perform IO
now need to do error detection that the scm_word is of the correct
type (since it won't be type-checked at compile time anymore), but
they also don't need to bother with the cport_vtable indirection
anymore.
I expect cport_vtables to go away because any port structure we need
can probably be filled in at the VU level (file, socket, string, etc.)
as a virtual fd if needed.
-jivera